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
(1) |
|
2
(6) |
3
(8) |
4
(1) |
5
|
6
(6) |
7
(3) |
8
(2) |
|
9
|
10
|
11
|
12
|
13
(4) |
14
|
15
|
|
16
(12) |
17
(4) |
18
(1) |
19
(8) |
20
|
21
(12) |
22
(4) |
|
23
(4) |
24
(14) |
25
|
26
|
27
(20) |
28
(31) |
29
(3) |
|
30
(13) |
31
(1) |
|
|
|
|
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv21307/linux Modified Files: org_lwjgl_Display.cpp org_lwjgl_input_Controller.cpp org_lwjgl_input_Keyboard.cpp org_lwjgl_input_Mouse.cpp org_lwjgl_opengl_BaseGL.cpp Log Message: Various linux fixes Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- org_lwjgl_Display.cpp 21 Mar 2003 17:37:58 -0000 1.25 +++ org_lwjgl_Display.cpp 21 Mar 2003 23:28:00 -0000 1.26 @@ -65,7 +65,6 @@ static XVisualInfo * vis_info; static Atom delete_atom; static bool gl_loaded = false; -static JNIEnv *saved_env; static jclass saved_clazz; extern void handlePointerMotion(XMotionEvent *); @@ -229,14 +228,14 @@ } } -void handleMessages(void) { +void handleMessages(JNIEnv *env) { XEvent event; while (XPending(disp) > 0) { XNextEvent(disp, &event); switch (event.type) { case ClientMessage: if ((event.xclient.format == 32) && (event.xclient.data.l[0] == delete_atom)) - saved_env->SetStaticBooleanField(saved_clazz, fid_close, JNI_TRUE); + env->SetStaticBooleanField(saved_clazz, fid_close, JNI_TRUE); break; case FocusIn: acquireInput(); @@ -299,8 +298,8 @@ return 1; } -static bool isMinimized() { - handleMessages(); +static bool isMinimized(JNIEnv *env, jclass clazz) { + handleMessages(env); return current_minimized; } @@ -322,12 +321,19 @@ * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_isMinimized(JNIEnv *env, jclass clazz) { - return isMinimized() ? JNI_TRUE : JNI_FALSE; + return isMinimized(env, clazz) ? JNI_TRUE : JNI_FALSE; } JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate(JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jint alpha_bits, jint depth_bits, jint stencil_bits, jboolean fullscreen, jstring title) { - saved_env = env; + // Get a global class instance, just to be sure + static jobject globalClassLock = NULL; + + if (globalClassLock == NULL) { + globalClassLock = env->NewGlobalRef(clazz); + } + saved_clazz = clazz; + fid_close = env->GetStaticFieldID(clazz, "closeRequested", "Z"); Window root_win; Index: org_lwjgl_input_Controller.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Controller.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Controller.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_input_Controller.cpp 11 Jan 2003 21:02:54 -0000 1.1 +++ org_lwjgl_input_Controller.cpp 21 Mar 2003 23:28:00 -0000 1.2 @@ -32,9 +32,9 @@ /** * $Id$ * - * Win32 controller handling. + * Linux controller handling. * - * @author Brian Matzon <br...@ma...> + * @author Elias Naur <br...@ma...> * @version $Revision$ */ #include <jni.h> Index: org_lwjgl_input_Keyboard.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Keyboard.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Keyboard.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- org_lwjgl_input_Keyboard.cpp 8 Mar 2003 22:14:17 -0000 1.17 +++ org_lwjgl_input_Keyboard.cpp 21 Mar 2003 23:28:00 -0000 1.18 @@ -69,7 +69,7 @@ extern Window win; extern bool releaseInput(void); -extern void handleMessages(void); +extern void handleMessages(JNIEnv *env); /* * Class: org_lwjgl_input_Keyboard @@ -79,13 +79,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_input_Keyboard_initIDs (JNIEnv * env, jclass clazz) { - // Get a global class instance, just to be sure - static jobject globalClassLock = NULL; - - if (globalClassLock == NULL) { - globalClassLock = env->NewGlobalRef(clazz); - } - fid_readBuffer = env->GetStaticFieldID(clazz, "readBuffer", "Ljava/nio/ByteBuffer;"); } @@ -267,7 +260,7 @@ XEvent event; unsigned char state; - handleMessages(); + handleMessages(env); updateGrab(); memcpy((unsigned char*)buf, key_buf, KEYBOARD_SIZE*sizeof(unsigned char)); } @@ -286,7 +279,7 @@ int state; int num_events = 0; - handleMessages(); + handleMessages(env); updateGrab(); while (buf_count < KEYBOARD_BUFFER_SIZE * 2 && (key_event = nextEventElement()) != NULL) { num_events++; Index: org_lwjgl_input_Mouse.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- org_lwjgl_input_Mouse.cpp 26 Feb 2003 18:11:32 -0000 1.18 +++ org_lwjgl_input_Mouse.cpp 21 Mar 2003 23:28:00 -0000 1.19 @@ -59,7 +59,7 @@ extern int screen; extern int getWindowWidth(void); extern int getWindowHeight(void); -extern void handleMessages(void); +extern void handleMessages(JNIEnv* env); static bool pointer_grabbed; static bool created = false; @@ -289,7 +289,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_input_Mouse_nPoll (JNIEnv * env, jclass clazz) { - handleMessages(); + handleMessages(env); updateGrab(); int moved_x = current_x - last_x; int moved_y = current_y - last_y; Index: org_lwjgl_opengl_BaseGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_BaseGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_BaseGL.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_opengl_BaseGL.cpp 14 Feb 2003 11:23:01 -0000 1.8 +++ org_lwjgl_opengl_BaseGL.cpp 21 Mar 2003 23:28:00 -0000 1.9 @@ -47,7 +47,7 @@ extern Window win; extern Display * disp; -extern void handleMessages(); +extern void handleMessages(JNIEnv* env); static void makeCurrent(void) { glXMakeCurrent(disp, win, context); @@ -115,7 +115,7 @@ */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_BaseGL_swapBuffers(JNIEnv * env, jobject obj) { - handleMessages(); + handleMessages(env); glXSwapBuffers(disp, win); } |
|
From: Brian M. <ma...@us...> - 2003-03-21 18:45:21
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv29085 Modified Files: org_lwjgl_openal_BaseAL.cpp extal.h extal.c Log Message: wip: load oal based on java.library.path Index: org_lwjgl_openal_BaseAL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_BaseAL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_BaseAL.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_openal_BaseAL.cpp 22 Dec 2002 21:44:49 -0000 1.3 +++ org_lwjgl_openal_BaseAL.cpp 21 Mar 2003 17:55:33 -0000 1.4 @@ -41,7 +41,7 @@ * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_BaseAL_nCreate (JNIEnv *env, jobject obj) { - if(!InitializeOpenAL()) { + if(!InitializeOpenAL(env)) { jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); env->ThrowNew(cls, "Unable to load function pointers to openal."); env->DeleteLocalRef(cls); Index: extal.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- extal.h 2 Jan 2003 05:45:43 -0000 1.15 +++ extal.h 21 Mar 2003 17:55:33 -0000 1.16 @@ -135,7 +135,7 @@ #define INITGUID #define OPENAL -int InitializeOpenAL(); +int InitializeOpenAL(JNIEnv *env); void DeInitializeOpenAL(); //alc Index: extal.c CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- extal.c 17 Mar 2003 18:34:18 -0000 1.9 +++ extal.c 21 Mar 2003 17:55:33 -0000 1.10 @@ -163,8 +163,22 @@ /** * Loads the OpenAL Library */ -void LoadOpenAL() { +void LoadOpenAL(JNIEnv *env) { #ifdef _WIN32 + jstring propertykey; + jstring librarypath; + jclass systemclass; + jmethodID propertymethod; + //compile bitch! + //propertykey = env->NewStringUTF("java.library.path"); + ///*systemclass = */env->FindClass("java/lang/System"); + //propertymethod = env->GetStaticMethodID(systemclass, "getProperty", "(Ljava/lang/String;)Ljava/lang/String"); + //librarypath = env->CallStaticObjectMethod(systemclass, jmethodID, propertykey); + printf("Loaded library path: %s", librarypath); + + //parse string + + //try to load for each path handleOAL = LoadLibrary("OpenAL32.dll"); #endif #ifdef _X11 @@ -187,13 +201,13 @@ /** * Initializes OpenAL by loading the library */ -int InitializeOpenAL() { +int InitializeOpenAL(JNIEnv *env) { if(handleOAL != 0) { return JNI_TRUE; } //load our library - LoadOpenAL(); + LoadOpenAL(env); // if we couldn't load the library, get out if(handleOAL == 0) { |
|
From: Elias N. <eli...@us...> - 2003-03-21 17:53:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv16731/linux Modified Files: org_lwjgl_Display.cpp Log Message: Added getPlatform() to linux Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- org_lwjgl_Display.cpp 19 Mar 2003 12:41:28 -0000 1.24 +++ org_lwjgl_Display.cpp 21 Mar 2003 17:37:58 -0000 1.25 @@ -508,3 +508,13 @@ return ret; } +/* + * Class: org_lwjgl_Display + * Method: getPlatform + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_Display_getPlatform + (JNIEnv * env, jclass clazz) +{ + return org_lwjgl_Display_PLATFORM_GLX; +} |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-21 17:08:29
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv29789/src/native/common Modified Files: org_lwjgl_Sys.h org_lwjgl_Display.h Log Message: New getPlatform() method added Index: org_lwjgl_Sys.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_Sys.h 21 Mar 2003 16:53:02 -0000 1.4 +++ org_lwjgl_Sys.h 21 Mar 2003 17:08:26 -0000 1.5 @@ -19,12 +19,6 @@ /* Inaccessible static: LIBRARY_NAME */ /* Inaccessible static: DEBUG */ /* Inaccessible static: _debug */ -#undef org_lwjgl_Sys_PLATFORM_WGL -#define org_lwjgl_Sys_PLATFORM_WGL 0L -#undef org_lwjgl_Sys_PLATFORM_GLX -#define org_lwjgl_Sys_PLATFORM_GLX 1L -#undef org_lwjgl_Sys_PLATFORM_AGL -#define org_lwjgl_Sys_PLATFORM_AGL 2L /* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_Sys @@ -81,14 +75,6 @@ */ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_alert (JNIEnv *, jclass, jstring, jstring); - -/* - * Class: org_lwjgl_Sys - * Method: getPlatform - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_Sys_getPlatform - (JNIEnv *, jclass); #ifdef __cplusplus } Index: org_lwjgl_Display.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Display.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Display.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_Display.h 19 Mar 2003 12:41:28 -0000 1.8 +++ org_lwjgl_Display.h 21 Mar 2003 17:08:26 -0000 1.9 @@ -12,7 +12,13 @@ /* Inaccessible static: mode */ /* Inaccessible static: handle */ /* Inaccessible static: closeRequested */ -/* Inaccessible static: class_00024org_00024lwjgl_00024Display */ +#undef org_lwjgl_Display_PLATFORM_WGL +#define org_lwjgl_Display_PLATFORM_WGL 0L +#undef org_lwjgl_Display_PLATFORM_GLX +#define org_lwjgl_Display_PLATFORM_GLX 1L +#undef org_lwjgl_Display_PLATFORM_AGL +#define org_lwjgl_Display_PLATFORM_AGL 2L +/* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_Display * Method: nGetAvailableDisplayModes @@ -43,6 +49,14 @@ * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_isMinimized + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_Display + * Method: getPlatform + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_Display_getPlatform (JNIEnv *, jclass); #ifdef __cplusplus |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-21 17:07:53
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv29264/src/native/win32 Modified Files: org_lwjgl_Sys.cpp org_lwjgl_Display.cpp Log Message: New getPlatform() method added Index: org_lwjgl_Sys.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_Sys.cpp 21 Mar 2003 16:57:56 -0000 1.5 +++ org_lwjgl_Sys.cpp 21 Mar 2003 17:07:50 -0000 1.6 @@ -163,15 +163,3 @@ env->ReleaseStringUTFChars(message, eMessageText); env->ReleaseStringUTFChars(title, cTitleBarText); } - -/* - * Class: org_lwjgl_Sys - * Method: getPlatform - * Signature: ()I - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_getPlatform - (JNIEnv * env, jclass clazz) -{ - return org_lwjgl_Sys_PLATFORM_WGL; -} - Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- org_lwjgl_Display.cpp 19 Mar 2003 12:41:28 -0000 1.30 +++ org_lwjgl_Display.cpp 21 Mar 2003 17:07:50 -0000 1.31 @@ -39,7 +39,7 @@ * @version $Revision$ */ -#include <windows.h> +#include <windows.h> #include "org_lwjgl_Display.h" #undef DIRECTINPUT_VERSION @@ -156,14 +156,14 @@ case SC_RESTORE: isMinimized = false; appActivate(false); - break; + break; case SC_CLOSE: environment->SetStaticBooleanField(clsDisplay, fidclose, true); //don't continue processing this command since this //would shutdown the window, which the application might not want to return 0L; } - } + } break; case WM_ACTIVATE: { @@ -177,12 +177,12 @@ break; } appActivate(!isMinimized); - } - break; - case WM_QUIT: - { - environment->SetStaticBooleanField(clsDisplay, fidclose, true); - return 0L; + } + break; + case WM_QUIT: + { + environment->SetStaticBooleanField(clsDisplay, fidclose, true); + return 0L; } } @@ -302,8 +302,8 @@ while(EnumDisplaySettings(DisplayDevice.DeviceName, j++, &DevMode) != 0) { if (DevMode.dmBitsPerPel > 8) { AvailableModes++; - } - } + } + } } #ifdef _DEBUG @@ -347,9 +347,9 @@ DevMode.dmSize = sizeof(DEVMODE); //enumerate all displaymodes - while(EnumDisplaySettings(NULL, j++, &DevMode) != 0) { - if (DevMode.dmBitsPerPel > 8) { - AvailableModes++; + while(EnumDisplaySettings(NULL, j++, &DevMode) != 0) { + if (DevMode.dmBitsPerPel > 8) { + AvailableModes++; } } @@ -357,7 +357,7 @@ printf("Found %d displaymodes\n", AvailableModes); #endif - // now that we have the count create the classes, and add 'em all - we'll remove dups in Java + // now that we have the count create the classes, and add 'em all - we'll remove dups in Java // Allocate an array of DisplayModes big enough jclass displayModeClass = env->FindClass("org/lwjgl/DisplayMode"); @@ -373,17 +373,17 @@ displayMode = env->NewObject(displayModeClass, displayModeConstructor, DevMode.dmPelsWidth, DevMode.dmPelsHeight, DevMode.dmBitsPerPel, DevMode.dmDisplayFrequency); - env->SetObjectArrayElement(ret, n++, displayMode); - } + env->SetObjectArrayElement(ret, n++, displayMode); + } } return ret; } -/* - * Class: org_lwjgl_Display - * Method: nCreate - * Signature: (IIIIIIIZLjava/lang/String;)Z - */ +/* + * Class: org_lwjgl_Display + * Method: nCreate + * Signature: (IIIIIIIZLjava/lang/String;)Z + */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate (JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jint alphaBits, jint depthBits, jint stencilBits, jboolean fullscreen, jstring title) @@ -536,14 +536,6 @@ 0, 0, 0 // layer masks ignored }; - // Ensure desktop color depth is adequate - int availableBitDepth = GetDeviceCaps(hdc, BITSPIXEL); - if (availableBitDepth < bpp) { - printf("This application requires a greater colour depth.\n"); - destroyAll(); - return JNI_FALSE; - }; - int iPixelFormat; // get the best available match of pixel format for the device context @@ -561,11 +553,13 @@ return JNI_FALSE; } + /* if (desc.cColorBits < bpp) { printf("This application requires a greater colour depth.\n"); destroyAll(); return JNI_FALSE; } + */ if (desc.cAlphaBits < alphaBits) { printf("This application requires a greater alpha depth.\n"); @@ -585,12 +579,12 @@ return JNI_FALSE; } - if ((desc.dwFlags & PFD_GENERIC_FORMAT) != 0 || (desc.dwFlags & PFD_GENERIC_ACCELERATED) != 0) { - printf("Mode not supported by hardware.\n"); - destroyAll(); - return JNI_FALSE; - } - + if ((desc.dwFlags & PFD_GENERIC_FORMAT) != 0 || (desc.dwFlags & PFD_GENERIC_ACCELERATED) != 0) { + printf("Mode not supported by hardware.\n"); + destroyAll(); + return JNI_FALSE; + } + if ((desc.dwFlags & flags) != flags) { printf("Capabilities not supported.\n"); destroyAll(); @@ -643,3 +637,16 @@ return isMinimized ? JNI_TRUE : JNI_FALSE; } + + +/* + * Class: org_lwjgl_Display + * Method: getPlatform + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_Display_getPlatform + (JNIEnv * env, jclass clazz) +{ + return org_lwjgl_Display_PLATFORM_WGL; +} + |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-21 17:06:01
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv27852/src/java/org/lwjgl/opengl Modified Files: BaseGL.java Log Message: New getPlatform() method added Index: BaseGL.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/BaseGL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/BaseGL.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- BaseGL.java 21 Dec 2002 12:37:19 -0000 1.8 +++ BaseGL.java 21 Mar 2003 17:05:55 -0000 1.9 @@ -189,4 +189,5 @@ && currentContext == this && Thread.currentThread() == renderThread; } + } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-21 17:06:01
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1:/tmp/cvs-serv27852/src/java/org/lwjgl Modified Files: Display.java Sys.java Math.java Log Message: New getPlatform() method added Index: Display.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Display.java 19 Mar 2003 12:41:27 -0000 1.18 +++ Display.java 21 Mar 2003 17:05:55 -0000 1.19 @@ -63,6 +63,20 @@ /** Whether or not the display has been requested to shutdown by the user */ private static boolean closeRequested = false; + /* + * Platforms. This will let you determine which platform you are running + * on, which is handy to know for some GL context calls. + */ + + /** Windows platform */ + public static final int PLATFORM_WGL = 0; + + /** GLX (Linux/Unix) platform */ + public static final int PLATFORM_GLX = 1; + + /** MacOSX platform */ + public static final int PLATFORM_AGL = 2; + /** * No construction allowed. */ @@ -79,30 +93,30 @@ * @return an array of all display modes the system reckons it can handle. */ public static DisplayMode[] getAvailableDisplayModes() { - DisplayMode[] unfilteredModes = nGetAvailableDisplayModes(); + DisplayMode[] unfilteredModes = nGetAvailableDisplayModes(); - if (unfilteredModes == null) { - return new DisplayMode[0]; - } - - // We'll use a HashSet to filter out the duplicated modes - HashSet modes = new HashSet(unfilteredModes.length); - - modes.addAll(Arrays.asList(unfilteredModes)); - DisplayMode[] filteredModes = new DisplayMode[modes.size()]; - modes.toArray(filteredModes); - - if(Sys.DEBUG) { - System.out.println("Removed " + (unfilteredModes.length - filteredModes.length) + " duplicate displaymodes"); - } - - return filteredModes; + if (unfilteredModes == null) { + return new DisplayMode[0]; + } + + // We'll use a HashSet to filter out the duplicated modes + HashSet modes = new HashSet(unfilteredModes.length); + + modes.addAll(Arrays.asList(unfilteredModes)); + DisplayMode[] filteredModes = new DisplayMode[modes.size()]; + modes.toArray(filteredModes); + + if (Sys.DEBUG) { + System.out.println("Removed " + (unfilteredModes.length - filteredModes.length) + " duplicate displaymodes"); + } + + return filteredModes; } - - /** - * Native method for getting displaymodes - */ - public static native DisplayMode[] nGetAvailableDisplayModes(); + + /** + * Native method for getting displaymodes + */ + public static native DisplayMode[] nGetAvailableDisplayModes(); /** * Create a display with the specified display mode. If the display is @@ -118,13 +132,7 @@ * @throws Exception if the display mode could not be set * @see #destroy() */ - public static void create( - DisplayMode displayMode, - int alpha, - int depth, - int stencil, - boolean fullscreen, - String title) + public static void create(DisplayMode displayMode, int alpha, int depth, int stencil, boolean fullscreen, String title) throws Exception { if (created) { @@ -280,4 +288,16 @@ public static boolean isCloseRequested() { return closeRequested; } + + /** + * Returns the operating system windowing platform. This will be one of the + * constants defined above. There is no "unknown" platform; a native library port + * has to provide a unique platform number for this mechanism to work. If the LWJGL + * is ported to, say, QNX, we will have a PLATFORM_QNX at the ready. + * + * @return the windowing system + */ + public static native int getPlatform(); + + } Index: Sys.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Sys.java 21 Mar 2003 16:57:40 -0000 1.15 +++ Sys.java 21 Mar 2003 17:05:56 -0000 1.16 @@ -101,20 +101,7 @@ } } - /* - * Platforms. This will let you determine which platform you are running - * on, which is handy to know for some GL calls. - */ - /** Windows platform */ - public static final int PLATFORM_WGL = 0; - - /** GLX (Linux/Unix) platform */ - public static final int PLATFORM_GLX = 1; - - /** MacOSX platform */ - public static final int PLATFORM_AGL = 2; - /** * @return the name of the native library to load */ @@ -223,14 +210,4 @@ */ public static native void alert(String title, String message); - /** - * Returns the operating system windowing platform. This will be one of the - * constants defined above. There is no "unknown" platform; a native library port - * has to provide a unique platform number for this mechanism to work. If the LWJGL - * is ported to, say, QNX, we will have a PLATFORM_QNX at the ready. - * - * @return the windowing system - */ - public static native int getPlatform(); - } Index: Math.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Math.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Math.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Math.java 21 Dec 2002 12:37:18 -0000 1.10 +++ Math.java 21 Mar 2003 17:05:56 -0000 1.11 @@ -32,6 +32,10 @@ package org.lwjgl; +import java.nio.*; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + /** * $Id$ * @@ -790,13 +794,36 @@ return (float) java.lang.Math.toDegrees(java.lang.Math.atan(theta)); } + /* We use NIO to do our bit fiddling */ + private static final ByteBuffer sqrtByteBuf = ByteBuffer.allocate(4).order(ByteOrder.nativeOrder()); + private static final IntBuffer sqrtIntBuf = sqrtByteBuf.asIntBuffer(); + private static final FloatBuffer sqrtFloatBuf = sqrtByteBuf.asFloatBuffer(); + /** - * Return the square root of a value - * @param n the number for which you want the square root - * @return sqrt(n) + * Approximate inverse square root function (Newton-Raphson?). This is a very approximate + * root, accurate to maybe 1 or 2 dp. + * @param x + * @return ~x^0.5 */ - public static float sqrt(float n) { - return (float) java.lang.Math.sqrt(n); + public static float invsqrt(float x) { + float xhalf = 0.5f * x; + sqrtFloatBuf.put(0, x); + int i = sqrtIntBuf.get(0); + i = 0x5f375a86 - (i >> 1); + sqrtIntBuf.put(0, i); + x = sqrtFloatBuf.get(0); + x *= (1.5f - xhalf * x * x); // This line may be duplicated for more accuracy. + return x; + } + + /** + * Approximate square root function (Newton-Raphson?). This is a very approximate + * root, accurate to maybe 1 or 2 dp. + * @param x + * @return ~x^0.5 + */ + public static float sqrt(float x) { + return 1.0f / invsqrt(x); } /* @@ -1100,5 +1127,6 @@ ); } + } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-21 16:57:59
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv20972/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: New getPlatform() method added Index: org_lwjgl_Sys.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_Sys.cpp 21 Mar 2003 16:53:19 -0000 1.4 +++ org_lwjgl_Sys.cpp 21 Mar 2003 16:57:56 -0000 1.5 @@ -49,21 +49,6 @@ __int64 hires_timer_start; // Hires timer start __int64 hires_timer; // Hires timer current time -// Platform -#ifdef _WIN32 -#define PLATFORM 0 -#else -#ifdef _X11 -#define PLATFORM 1 -#else -#ifdef APPLE -#define PLATFORM 2 -#else -#error Unsupported Platform! -#endif -#endif - - /* * Class: org_lwjgl_Sys * Method: getDirectBufferAddress |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-21 16:57:44
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1:/tmp/cvs-serv20604/src/java/org/lwjgl Modified Files: Sys.java Log Message: New getPlatform() method added Index: Sys.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Sys.java 21 Mar 2003 16:51:45 -0000 1.14 +++ Sys.java 21 Mar 2003 16:57:40 -0000 1.15 @@ -112,7 +112,7 @@ /** GLX (Linux/Unix) platform */ public static final int PLATFORM_GLX = 1; - /** Apply platform */ + /** MacOSX platform */ public static final int PLATFORM_AGL = 2; /** |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-21 16:53:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv17750/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: New getPlatform() method added Index: org_lwjgl_Sys.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_Sys.cpp 22 Dec 2002 19:52:44 -0000 1.3 +++ org_lwjgl_Sys.cpp 21 Mar 2003 16:53:19 -0000 1.4 @@ -49,6 +49,21 @@ __int64 hires_timer_start; // Hires timer start __int64 hires_timer; // Hires timer current time +// Platform +#ifdef _WIN32 +#define PLATFORM 0 +#else +#ifdef _X11 +#define PLATFORM 1 +#else +#ifdef APPLE +#define PLATFORM 2 +#else +#error Unsupported Platform! +#endif +#endif + + /* * Class: org_lwjgl_Sys * Method: getDirectBufferAddress @@ -163,3 +178,15 @@ env->ReleaseStringUTFChars(message, eMessageText); env->ReleaseStringUTFChars(title, cTitleBarText); } + +/* + * Class: org_lwjgl_Sys + * Method: getPlatform + * Signature: ()I + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Sys_getPlatform + (JNIEnv * env, jclass clazz) +{ + return org_lwjgl_Sys_PLATFORM_WGL; +} + |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-21 16:53:05
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv17611/src/native/common Modified Files: org_lwjgl_Sys.h Log Message: New getPlatform() method added Index: org_lwjgl_Sys.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_Sys.h 22 Dec 2002 19:52:31 -0000 1.3 +++ org_lwjgl_Sys.h 21 Mar 2003 16:53:02 -0000 1.4 @@ -19,6 +19,12 @@ /* Inaccessible static: LIBRARY_NAME */ /* Inaccessible static: DEBUG */ /* Inaccessible static: _debug */ +#undef org_lwjgl_Sys_PLATFORM_WGL +#define org_lwjgl_Sys_PLATFORM_WGL 0L +#undef org_lwjgl_Sys_PLATFORM_GLX +#define org_lwjgl_Sys_PLATFORM_GLX 1L +#undef org_lwjgl_Sys_PLATFORM_AGL +#define org_lwjgl_Sys_PLATFORM_AGL 2L /* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_Sys @@ -75,6 +81,14 @@ */ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_alert (JNIEnv *, jclass, jstring, jstring); + +/* + * Class: org_lwjgl_Sys + * Method: getPlatform + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_Sys_getPlatform + (JNIEnv *, jclass); #ifdef __cplusplus } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-03-21 16:51:49
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1:/tmp/cvs-serv16954/src/java/org/lwjgl Modified Files: Sys.java Log Message: New getPlatform() method added Index: Sys.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Sys.java 21 Dec 2002 12:37:18 -0000 1.13 +++ Sys.java 21 Mar 2003 16:51:45 -0000 1.14 @@ -83,6 +83,7 @@ */ public static final boolean DEBUG; + private static boolean _debug; static { try { @@ -100,6 +101,20 @@ } } + /* + * Platforms. This will let you determine which platform you are running + * on, which is handy to know for some GL calls. + */ + + /** Windows platform */ + public static final int PLATFORM_WGL = 0; + + /** GLX (Linux/Unix) platform */ + public static final int PLATFORM_GLX = 1; + + /** Apply platform */ + public static final int PLATFORM_AGL = 2; + /** * @return the name of the native library to load */ @@ -207,5 +222,15 @@ * @param message The message text for the alert. */ public static native void alert(String title, String message); + + /** + * Returns the operating system windowing platform. This will be one of the + * constants defined above. There is no "unknown" platform; a native library port + * has to provide a unique platform number for this mechanism to work. If the LWJGL + * is ported to, say, QNX, we will have a PLATFORM_QNX at the ready. + * + * @return the windowing system + */ + public static native int getPlatform(); } |