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) |
2
(8) |
3
(4) |
4
(6) |
5
(1) |
6
|
|
7
(8) |
8
|
9
(11) |
10
(5) |
11
(1) |
12
|
13
|
|
14
|
15
|
16
(3) |
17
(1) |
18
|
19
|
20
|
|
21
(1) |
22
(1) |
23
(2) |
24
|
25
(1) |
26
(11) |
27
|
|
28
(5) |
29
(5) |
30
(7) |
|
|
|
|
|
From: Elias N. <eli...@us...> - 2003-09-09 18:11:42
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1:/tmp/cvs-serv9983/macosx Modified Files: org_lwjgl_opengl_Window.cpp Log Message: Index: org_lwjgl_opengl_Window.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_Window.cpp 8 Sep 2003 16:40:52 -0000 1.2 +++ org_lwjgl_opengl_Window.cpp 9 Sep 2003 18:11:01 -0000 1.3 @@ -39,11 +39,12 @@ * @version $Revision$ */ -#include <JavaVM/jni.h> #include <Carbon/Carbon.h> +#include <JavaVM/jni.h> #include "org_lwjgl_opengl_Window.h" static WindowRef win_ref; +static bool close_requested; /* * Utility function to throw an Exception @@ -55,24 +56,86 @@ env->DeleteLocalRef(cls); } -/* - * Class: org_lwjgl_opengl_Window - * Method: nCreate - * Signature: (Ljava/lang/String;IIIIZIIII)V - */ +static void setWindowTitle(JNIEnv *env, jstring title_obj) { + const char* title = env->GetStringUTFChars(title_obj, NULL); + int str_len = env->GetStringUTFLength(title_obj); + CFStringRef cf_title = CFStringCreateWithBytes(NULL, (const UInt8*)title, str_len, kCFStringEncodingUTF8, false); + if (cf_title == NULL) { +#ifdef _DEBUG + printf("Could not set window title\n"); +#endif + return; + } + SetWindowTitleWithCFString(win_ref, cf_title); + CFRelease(cf_title); + env->ReleaseStringUTFChars(title_obj, title); +} + +static pascal OSStatus doWindowClose(EventHandlerCallRef next_handler, EventRef event, void *user_data) { + close_requested = true; + return noErr; +} + +static void registerEventHandlers(void) { +/* EventTargetRef event_target = GetWindowEventTarget(win_ref); + status = InstallStandardEventHandler(event_target); + if (noErr != status) { + DisposeWindow(win_ref); + throwException(env, "Could not install default window event handler"); + return; + }*/ + EventTypeSpec eventType; + eventType.eventClass = kEventClassWindow; + eventType.eventKind = kEventWindowClose; + EventHandlerUPP handlerUPP = NewEventHandlerUPP(doWindowClose); + InstallWindowEventHandler(win_ref, handlerUPP, 1, &eventType, NULL, NULL); + DisposeEventHandlerUPP(handlerUPP); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Window_nIsCloseRequested(JNIEnv *, jclass) { + const bool saved = close_requested; + close_requested = false; + return saved; +} + JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nCreate(JNIEnv *env, jclass clazz, jstring title, jint x, jint y, jint width, jint height, jboolean fullscreen, jint bpp, jint alpha, jint depth, jint stencil) { - const Rect rect = {y, x, y + height, x + width}; -/* rect.top = y; - rect.left = x; - rect.bottom = y + height; - rect.right = x + width;*/ + Rect rect; OSStatus status; + const WindowAttributes window_attr = kWindowStandardDocumentAttributes/*kWindowCloseBoxAttribute| + kWindowCollapseBoxAttribute*/| + kWindowStandardHandlerAttribute; + + SetRect(&rect, x, y, x + width, y + height); + close_requested = false; - status = CreateNewWindow(kPlainWindowClass, kWindowNoAttributes, &rect, &win_ref); + status = CreateNewWindow(kDocumentWindowClass, window_attr, &rect, &win_ref); if (noErr != status) { throwException(env, "Could not create window"); return; } - printf("yir\n"); +/* setWindowTitle(env, title); + const RGBColor background_color = { 0, 0, 0 }; + status = SetWindowContentColor(win_ref, &background_color); + if (noErr != status) { + DisposeWindow(win_ref); + throwException(env, "Could not alter window background color"); + return; + } + registerEventHandlers();*/ + status = TransitionWindow(win_ref, kWindowZoomTransitionEffect, kWindowShowTransitionAction, NULL); + if (noErr != status) { + DisposeWindow(win_ref); + throwException(env, "Could not show window"); + return; + } +// SelectWindow(win_ref); + InitCursor(); + RunApplicationEventLoop(); + printf("Window creation succeeded\n"); } +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nDestroy + (JNIEnv *env, jclass clazz) +{ + DisposeWindow(win_ref); +} |
|
From: Elias N. <eli...@us...> - 2003-09-09 08:11:02
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv17199 Modified Files: Makefile.am configure.in Log Message: Index: Makefile.am CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Makefile.am 8 Sep 2003 16:40:52 -0000 1.13 +++ Makefile.am 9 Sep 2003 08:10:38 -0000 1.14 @@ -1,7 +1,6 @@ SUBDIRS = common @native_build_dir@ lib_LTLIBRARIES = liblwjgl.la -liblwjgl_la_LDFLAGS = -framework Carbon liblwjgl_la_SOURCES = dummy.cpp liblwjgl_la_LIBADD = common/libcommon.la @native_build_dir@/libnative.la liblwjgl_la_DEPENDENCIES = common/libcommon.la @native_build_dir@/libnative.la Index: configure.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- configure.in 8 Sep 2003 16:43:53 -0000 1.43 +++ configure.in 9 Sep 2003 08:10:38 -0000 1.44 @@ -30,7 +30,7 @@ case "$host_os" in darwin*) _BUILD_FLAGS="-D_AGL -fpascal-strings" - LIBS="-framework Carbon -framework JavaVM" + LDFLAGS="-Xlinker -framework -Xlinker Carbon -Xlinker -framework -Xlinker JavaVM" NATIVE_BUILD_DIR=macosx CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS -Wall $_BUILD_FLAGS" CFLAGS="$CFLAGS $DEBUG_FLAGS -Wall $_BUILD_FLAGS" |
|
From: Elias N. <eli...@us...> - 2003-09-09 06:44:54
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv9172 Modified Files: configure.in Log Message: Index: configure.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- configure.in 8 Sep 2003 16:40:52 -0000 1.42 +++ configure.in 8 Sep 2003 16:43:53 -0000 1.43 @@ -51,7 +51,7 @@ *) AC_MSG_ERROR([Unsupported system $host_os]);; esac -#CC="$CXX" +CC="$CXX" AC_PROG_LIBTOOL AC_JNI_INCLUDE_DIR |
|
From: Elias N. <eli...@us...> - 2003-09-09 03:30:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv9124/linux Modified Files: org_lwjgl_Display.cpp Log Message: 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.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- org_lwjgl_Display.cpp 24 Jun 2003 12:24:55 -0000 1.37 +++ org_lwjgl_Display.cpp 8 Sep 2003 14:51:01 -0000 1.38 @@ -39,15 +39,12 @@ * @version $Revision$ */ - -#include "extgl.h" #include <X11/X.h> #include <X11/Xlib.h> #include <X11/extensions/xf86vmode.h> #include <X11/Xutil.h> #include <stdio.h> #include <stdlib.h> -#include <assert.h> #include <math.h> #include <jni.h> #include "org_lwjgl_Display.h" |
|
From: Elias N. <eli...@us...> - 2003-09-09 03:00:14
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv7293 Modified Files: Makefile.am configure.in Added Files: dummy.cpp Log Message: CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/dummy.cpp Index: Makefile.am CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile.am 7 Sep 2003 16:11:15 -0000 1.11 +++ Makefile.am 8 Sep 2003 16:34:38 -0000 1.12 @@ -1,6 +1,6 @@ SUBDIRS = common @native_build_dir@ lib_LTLIBRARIES = liblwjgl.la -liblwjgl_la_SOURCES = +liblwjgl_la_SOURCES = dummy.cpp liblwjgl_la_LIBADD = common/libcommon.la @native_build_dir@/libnative.la liblwjgl_la_DEPENDENCIES = common/libcommon.la @native_build_dir@/libnative.la Index: configure.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- configure.in 8 Sep 2003 14:40:45 -0000 1.40 +++ configure.in 8 Sep 2003 16:34:38 -0000 1.41 @@ -50,7 +50,7 @@ *) AC_MSG_ERROR([Unsupported system $host_os]);; esac -CC="$CXX" +#CC="$CXX" AC_PROG_LIBTOOL AC_JNI_INCLUDE_DIR |
|
From: Elias N. <eli...@us...> - 2003-09-09 02:54:11
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv8591 Modified Files: Makefile.am configure.in Log Message: Index: Makefile.am CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.am 8 Sep 2003 16:34:38 -0000 1.12 +++ Makefile.am 8 Sep 2003 16:40:52 -0000 1.13 @@ -1,6 +1,7 @@ SUBDIRS = common @native_build_dir@ lib_LTLIBRARIES = liblwjgl.la +liblwjgl_la_LDFLAGS = -framework Carbon liblwjgl_la_SOURCES = dummy.cpp liblwjgl_la_LIBADD = common/libcommon.la @native_build_dir@/libnative.la liblwjgl_la_DEPENDENCIES = common/libcommon.la @native_build_dir@/libnative.la Index: configure.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- configure.in 8 Sep 2003 16:34:38 -0000 1.41 +++ configure.in 8 Sep 2003 16:40:52 -0000 1.42 @@ -30,6 +30,7 @@ case "$host_os" in darwin*) _BUILD_FLAGS="-D_AGL -fpascal-strings" + LIBS="-framework Carbon -framework JavaVM" NATIVE_BUILD_DIR=macosx CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS -Wall $_BUILD_FLAGS" CFLAGS="$CFLAGS $DEBUG_FLAGS -Wall $_BUILD_FLAGS" |
|
From: Elias N. <eli...@us...> - 2003-09-09 01:55:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1:/tmp/cvs-serv8591/macosx Modified Files: Makefile.am org_lwjgl_Display.cpp org_lwjgl_Sys.cpp org_lwjgl_opengl_Window.cpp Log Message: Index: Makefile.am CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 8 Sep 2003 14:40:46 -0000 1.3 +++ Makefile.am 8 Sep 2003 16:40:52 -0000 1.4 @@ -4,8 +4,8 @@ INCLUDES = -I../common NATIVE = \ -# org_lwjgl_Display.cpp \ -# org_lwjgl_Sys.cpp \ + org_lwjgl_Display.cpp \ + org_lwjgl_Sys.cpp \ # org_lwjgl_input_Controller.cpp \ # org_lwjgl_input_Keyboard.cpp \ # org_lwjgl_input_Mouse.cpp \ Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Display.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- org_lwjgl_Display.cpp 7 Sep 2003 16:21:04 -0000 1.16 +++ org_lwjgl_Display.cpp 8 Sep 2003 16:40:52 -0000 1.17 @@ -1,231 +1,63 @@ -/* - * Copyright (c) 2002 Lightweight Java Game Library Project +/* + * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'Light Weight Java Game Library' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "org_lwjgl_Display.h" -#include <JavaVM/jni.h> -#include <ApplicationServices/ApplicationServices.h> -#include <OpenGL/OpenGL.h> - - -static long _getDictLong (CFDictionaryRef refDict, CFStringRef key) -{ - long int_value; - - CFNumberRef number_value = (CFNumberRef) CFDictionaryGetValue(refDict, key); - - if (!number_value) - { - // if can't get a number for the dictionary - return -1; // fail - } - - if (!CFNumberGetValue(number_value, kCFNumberLongType, &int_value)) - { - // or if cant convert it - return -1; // fail - } - - return int_value; // otherwise return the long value -} - -static double _getDictDouble (CFDictionaryRef refDict, CFStringRef key) -{ - double double_value; - - CFNumberRef number_value = (CFNumberRef) CFDictionaryGetValue(refDict, key); - - if (!number_value) - { - // if can't get a number for the dictionary - return -1; // fail - } - - if (!CFNumberGetValue(number_value, kCFNumberDoubleType, &double_value)) // or if cant convert it - { - return -1; // fail - } - - return double_value; // otherwise return the long value -} - -jobjectArray GetAvailableDisplayModesOSX(JNIEnv * env) -{ - CFIndex i, count; - CFIndex availableModes = 0; - CFArrayRef displayModes = NULL; - int n = 0; - - - displayModes = CGDisplayAvailableModes( kCGDirectMainDisplay ); - count = CFArrayGetCount( displayModes ); - - // get a count of the number of display modes on this machine with a bpp greater than 8 - // - for ( i = 0; i < count; i++ ) - { - CFDictionaryRef mode = static_cast<CFDictionaryRef>( CFArrayGetValueAtIndex( displayModes, i ) ); - long bpp = _getDictLong( mode, kCGDisplayBitsPerPixel ); - - if ( bpp > 8 ) - { - availableModes ++; - } - } - - // 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"); - jobjectArray ret = env->NewObjectArray( availableModes, displayModeClass, NULL); - jmethodID displayModeConstructor = env->GetMethodID(displayModeClass, "<init>", "(IIII)V"); - - for ( i = 0; i < count; i++ ) - { - CFDictionaryRef modeDict = static_cast<CFDictionaryRef>( CFArrayGetValueAtIndex( displayModes, i ) ); - long width = _getDictLong( modeDict, kCGDisplayWidth ); - long height = _getDictLong( modeDict, kCGDisplayHeight ); - long freq = (long)(_getDictDouble( modeDict, kCGDisplayRefreshRate ) + 0.5 ); - long bpp = _getDictLong( modeDict, kCGDisplayBitsPerPixel ); - - if ( bpp > 8 ) - { - jobject displayMode; - displayMode = env->NewObject(displayModeClass, displayModeConstructor, - width, height, - bpp, freq); - - env->SetObjectArrayElement(ret, n++, displayMode); - } - } - - return ret; -} - - - - -/* - * Class: org_lwjgl_Display - * Method: init - * Signature: ()V +/** + * $Id$ + * + * Mac OS X specific library for display handling. + * + * @author elias_naur <eli...@us...> + * @version $Revision$ */ -JNIEXPORT void JNICALL Java_org_lwjgl_Display_init -(JNIEnv * env, jclass clazz) -{ - if ( CGDisplayCapture( kCGDirectMainDisplay ) != kCGErrorSuccess ) - { - printf("Unable to capture the display. Without capturing the display - this application cannot run"); - return; - } - - //Get the current display mode from the system - // - int width = CGDisplayPixelsWide( kCGDirectMainDisplay ); - int height = CGDisplayPixelsHigh( kCGDirectMainDisplay ); - int bpp = CGDisplayBitsPerPixel( kCGDirectMainDisplay ); - int freq = (int)_getDictDouble (CGDisplayCurrentMode ( kCGDirectMainDisplay ), kCGDisplayRefreshRate); - - jclass jclass_DisplayMode = env->FindClass("org/lwjgl/DisplayMode"); - jmethodID ctor = env->GetMethodID(jclass_DisplayMode, "<init>", "(IIII)V"); - jobject newMode = env->NewObject(jclass_DisplayMode, ctor, width, height, bpp, freq); - jfieldID fid_initialMode = env->GetStaticFieldID(clazz, "mode", "Lorg/lwjgl/DisplayMode;"); - env->SetStaticObjectField(clazz, fid_initialMode, newMode); - env->DeleteLocalRef(newMode); -} +#include <JavaVM/jni.h> +#include "org_lwjgl_Display.h" -/* - * Class: org_lwjgl_Display - * Method: setDisplayMode - * Signature: (Lorg/lwjgl/DisplayMode;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Display_setDisplayMode -(JNIEnv * env, jclass clazz, jobject mode) +JNIEXPORT void JNICALL Java_org_lwjgl_Display_init + (JNIEnv * env, jclass clazz) { - jclass cls_displayMode = env->FindClass("org/lwjgl/DisplayMode"); - jfieldID fid_width = env->GetFieldID(cls_displayMode, "width", "I"); - jfieldID fid_height = env->GetFieldID(cls_displayMode, "height", "I"); - jfieldID fid_bpp = env->GetFieldID(cls_displayMode, "bpp", "I"); - jfieldID fid_freq = env->GetFieldID(cls_displayMode, "freq", "I"); - - int width = env->GetIntField(mode, fid_width); - int height = env->GetIntField(mode, fid_height); - int bpp = env->GetIntField(mode, fid_bpp); - int freq = env->GetIntField(mode, fid_freq); - - CFDictionaryRef displayMode; - displayMode = CGDisplayBestModeForParametersAndRefreshRate( kCGDirectMainDisplay, - bpp, - width, height, - freq, - NULL ); - CGDisplaySwitchToMode( kCGDirectMainDisplay, displayMode ) ; - - // The change was successful but might not be the exact change we were expecting. - // Now we'll construct a new DisplayMode instance and stash it back in the Display - // class's mode instance variable. - - jmethodID ctor = env->GetMethodID(cls_displayMode, "<init>", "(IIII)V"); - jobject newMode = env->NewObject(cls_displayMode, ctor, width, height, bpp, freq); - jfieldID fid_initialMode = env->GetStaticFieldID(clazz, "mode", "Lorg/lwjgl/DisplayMode;"); - env->SetStaticObjectField(clazz, fid_initialMode, newMode); - env->DeleteLocalRef(newMode); } -/* - * Class: org_lwjgl_Display - * Method: resetDisplayMode - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Display_resetDisplayMode -(JNIEnv *, jclass) -{ - // the purpose of this method is to return the display mode to whatever it was before - // the application takes over. OSX is smart enough to not require any of this - // foolishness :) - - //release the display that we captured so other applications will still work - // - CGReleaseAllDisplays(); +JNIEXPORT void JNICALL Java_org_lwjgl_Display_setDisplayMode(JNIEnv * env, jclass clazz, jobject mode) { } /* * Class: org_lwjgl_Display * Method: nGetAvailableDisplayModes * Signature: ()[Lorg/lwjgl/DisplayMode; - */ + */ JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_Display_nGetAvailableDisplayModes -(JNIEnv * env, jclass clazz) + (JNIEnv * env, jclass clazz) { - return GetAvailableDisplayModesOSX( env ); } /* @@ -234,34 +66,35 @@ * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_lwjgl_Display_getPlatform -(JNIEnv * env, jclass clazz) + (JNIEnv * env, jclass clazz) { - return org_lwjgl_Display_PLATFORM_AGL; + return org_lwjgl_Display_PLATFORM_AGL; } /* * Class: org_lwjgl_Display - * Method: getGammaRamp - * Signature: ([I[I[I)Z -*/ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_getGammaRamp -(JNIEnv *, jclass, jintArray, jintArray, jintArray) + * Method: getGammaRampLength + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_Display_getGammaRampLength + (JNIEnv *env, jclass clazz) { - return false; } /* * Class: org_lwjgl_Display * Method: setGammaRamp - * Signature: ([I[I[I)Z -*/ + * Signature: (I)Z + */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_setGammaRamp -(JNIEnv *, jclass, jintArray, jintArray, jintArray) + (JNIEnv *env, jclass clazz, jobject gamma_ramp_buffer) { - return false; } - - - - +/* + * Class: org_lwjgl_Display + * Method: resetDisplayMode + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Display_resetDisplayMode(JNIEnv *, jclass) { +} Index: org_lwjgl_Sys.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Sys.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_Sys.cpp 10 May 2003 04:58:18 -0000 1.5 +++ org_lwjgl_Sys.cpp 8 Sep 2003 16:40:52 -0000 1.6 @@ -50,39 +50,6 @@ /* * Class: org_lwjgl_Sys - * Method: nGetNULLValue - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_Sys_nGetNULLValue -(JNIEnv *, jclass) -{ - return (jint)NULL; -} - -/* - * Class: org_lwjgl_Sys - * Method: getDirectBufferAddress - * Signature: (Ljava/nio/Buffer;)I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_Sys_getDirectBufferAddress -(JNIEnv * env, jclass clazz, jobject buf) -{ - return (jint) env->GetDirectBufferAddress(buf); -} - -/* - * Class: org_lwjgl_Sys - * Method: createDirectBuffer - * Signature: (II)Ljava/nio/ByteBuffer; - */ -JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createDirectBuffer -(JNIEnv * env, jclass clazz, jint address, jint length) -{ - return env->NewDirectByteBuffer((void *)address, length); -} - -/* - * Class: org_lwjgl_Sys * Method: getTimerResolution * Signature: ()J */ @@ -92,7 +59,7 @@ return hires_timer_freq; } -long queryTime(void) { +static long queryTime(void) { struct timeval tv; if (gettimeofday(&tv, NULL) == -1) { #ifdef _DEBUG Index: org_lwjgl_opengl_Window.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_Window.cpp 8 Sep 2003 14:40:46 -0000 1.1 +++ org_lwjgl_opengl_Window.cpp 8 Sep 2003 16:40:52 -0000 1.2 @@ -41,6 +41,7 @@ #include <JavaVM/jni.h> #include <Carbon/Carbon.h> +#include "org_lwjgl_opengl_Window.h" static WindowRef win_ref; |
|
From: Elias N. <eli...@us...> - 2003-09-09 01:13:48
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1:/tmp/cvs-serv7161/macosx Modified Files: Makefile.am Added Files: org_lwjgl_opengl_Window.cpp Log Message: --- NEW FILE: org_lwjgl_opengl_Window.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp /* * Copyright (c) 2002 Light Weight Java Game Library 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 'Light Weight Java Game Library' 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. */ /** * $Id: org_lwjgl_opengl_Window.cpp,v 1.1 2003/09/08 14:40:46 elias_naur Exp $ * * Base OSX functionality for GL. * * @author Elias Naur <eli...@so...> * @version $Revision: 1.1 $ */ #include <JavaVM/jni.h> #include <Carbon/Carbon.h> static WindowRef win_ref; /* * Utility function to throw an Exception */ static void throwException(JNIEnv * env, const char * err) { jclass cls = env->FindClass("java/lang/Exception"); env->ThrowNew(cls, err); env->DeleteLocalRef(cls); } /* * Class: org_lwjgl_opengl_Window * Method: nCreate * Signature: (Ljava/lang/String;IIIIZIIII)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nCreate(JNIEnv *env, jclass clazz, jstring title, jint x, jint y, jint width, jint height, jboolean fullscreen, jint bpp, jint alpha, jint depth, jint stencil) { const Rect rect = {y, x, y + height, x + width}; /* rect.top = y; rect.left = x; rect.bottom = y + height; rect.right = x + width;*/ OSStatus status; status = CreateNewWindow(kPlainWindowClass, kWindowNoAttributes, &rect, &win_ref); if (noErr != status) { throwException(env, "Could not create window"); return; } printf("yir\n"); } Index: Makefile.am CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 7 Sep 2003 16:21:04 -0000 1.2 +++ Makefile.am 8 Sep 2003 14:40:46 -0000 1.3 @@ -10,7 +10,7 @@ # org_lwjgl_input_Keyboard.cpp \ # org_lwjgl_input_Mouse.cpp \ # org_lwjgl_input_Cursor.cpp \ -# org_lwjgl_opengl_Window.cpp \ + org_lwjgl_opengl_Window.cpp # org_lwjgl_opengl_GLCaps.cpp \ # org_lwjgl_opengl_Pbuffer.cpp |
|
From: Elias N. <eli...@us...> - 2003-09-09 01:11:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv7161 Modified Files: autogen.sh configure.in Log Message: Index: autogen.sh CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/autogen.sh =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/autogen.sh,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- autogen.sh 7 Sep 2003 16:11:15 -0000 1.8 +++ autogen.sh 8 Sep 2003 14:40:45 -0000 1.9 @@ -1,4 +1,4 @@ aclocal autoheader -automake --foreign --include-deps --add-missing --copy +automake --foreign --include-deps --add-missing autoconf Index: configure.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- configure.in 7 Sep 2003 16:11:15 -0000 1.39 +++ configure.in 8 Sep 2003 14:40:45 -0000 1.40 @@ -26,19 +26,16 @@ DEBUG_FLAGS= fi -CC="$CXX" -AC_LIBTOOL_DLOPEN -AC_PROG_LIBTOOL +AC_CANONICAL_HOST case "$host_os" in - darwin*) _BUILD_FLAGS="-D_AGL -fpascal-strings -I/Library/Frameworks/OpenAL.framework/Headers" - AC_CHECK_HEADER([/Library/Frameworks/OpenAL.framework/Headers/altypes.h],, AC_MSG_ERROR([OpenAL headers required])) - AC_CHECK_HEADER([/Library/Frameworks/OpenAL.framework/Headers/alctypes.h],, AC_MSG_ERROR([OpenAL headers required])) + darwin*) _BUILD_FLAGS="-D_AGL -fpascal-strings" NATIVE_BUILD_DIR=macosx CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS -Wall $_BUILD_FLAGS" CFLAGS="$CFLAGS $DEBUG_FLAGS -Wall $_BUILD_FLAGS" ;; bsdi* | linux* | solaris*) AC_PATH_XTRA + AC_LIBTOOL_DLOPEN _BUILD_FLAGS="-pthread -D_X11 $X_CFLAGS" AC_CHECK_HEADERS([AL/altypes.h AL/alctypes.h],, AC_MSG_ERROR([OpenAL headers required])) NATIVE_BUILD_DIR=linux @@ -49,17 +46,12 @@ AC_CHECK_LIB(Xext, main,, AC_MSG_ERROR(Xext is required)) AC_CHECK_LIB(Xxf86vm, main,, AC_MSG_ERROR(Xxf86vm is required)) AC_CHECK_LIB(pthread, pthread_create,, AC_MSG_ERROR(pthread is required)) - ;; *) AC_MSG_ERROR([Unsupported system $host_os]);; esac -AC_SUBST(native_build_dir, [$NATIVE_BUILD_DIR]) - -# Checks for libraries. - -# Checks for header files. -AC_HEADER_STDC +CC="$CXX" +AC_PROG_LIBTOOL AC_JNI_INCLUDE_DIR @@ -67,6 +59,13 @@ do CXXFLAGS="$CXXFLAGS -I$JNI_INCLUDE_DIR" done + +AC_SUBST(native_build_dir, [$NATIVE_BUILD_DIR]) + +# Checks for libraries. + +# Checks for header files. +AC_HEADER_STDC AC_CHECK_HEADER([stddef.h stdlib.h string.h sys/time.h]) |
|
From: Elias N. <eli...@us...> - 2003-09-09 01:11:44
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv7161/common Modified Files: extal.cpp extal.h Log Message: Index: extal.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- extal.cpp 7 Sep 2003 16:11:15 -0000 1.8 +++ extal.cpp 8 Sep 2003 14:40:46 -0000 1.9 @@ -31,7 +31,6 @@ */ #include <stdio.h> -#include <jni.h> #include "extal.h" #ifdef _X11 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.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- extal.h 7 Sep 2003 16:11:15 -0000 1.20 +++ extal.h 8 Sep 2003 14:40:46 -0000 1.21 @@ -40,10 +40,17 @@ #ifdef _X11 #include <AL/altypes.h> #include <AL/alctypes.h> -#else +#endif +#ifdef _WIN32 #include <altypes.h> #include <alctypes.h> #endif +#ifdef _AGL +#include <OpenAL/alctypes.h> +#include <OpenAL/altypes.h> +#endif + +#include <jni.h> #ifdef __cplusplus extern "C" { |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-09-09 00:53:58
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input In directory sc8-pr-cvs1:/tmp/cvs-serv8193/src/java/org/lwjgl/test/input Modified Files: HWCursorTest.java Log Message: Fixed spelling Index: HWCursorTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/HWCursorTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/HWCursorTest.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- HWCursorTest.java 17 Aug 2003 18:40:57 -0000 1.16 +++ HWCursorTest.java 8 Sep 2003 16:39:04 -0000 1.17 @@ -98,7 +98,7 @@ } catch (Exception e) { e.printStackTrace(); } - if ((Mouse.getNativeCursorCaps() & Mouse.CURSOR_ONE_BIT_TRANSPARANCY) == 0) { + if ((Mouse.getNativeCursorCaps() & Mouse.CURSOR_ONE_BIT_TRANSPARENCY) == 0) { System.out.println("No HW cursor support!"); System.exit(0); } |