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
(8) |
2
(8) |
3
(8) |
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
(6) |
|
12
(2) |
13
|
14
|
15
|
16
|
17
|
18
|
|
19
|
20
|
21
|
22
|
23
(6) |
24
|
25
|
|
26
|
27
(1) |
28
|
29
(2) |
30
(1) |
31
(2) |
|
|
From: Gregory P. <gre...@us...> - 2003-01-30 18:57:00
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1:/tmp/cvs-serv31694/native/macosx Modified Files: org_lwjgl_opengl_BaseGL.cpp org_lwjgl_Display.cpp RenderingContext.h RenderingContext.cpp Log Message: Added changes to support the selection of display modes on OSX in multiple monitor configurations. Currently defaults to only getting the display modes of display[0] - the primary display since lwjgl doesn't yet support clean multi monitor configuration programatically. This code based off the Apple provided sample code at http://developer.apple.com/samplecode/Sample_Code/Graphics_2D/Mode.htm Index: org_lwjgl_opengl_BaseGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_BaseGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_BaseGL.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_opengl_BaseGL.cpp 1 Jan 2003 03:58:03 -0000 1.4 +++ org_lwjgl_opengl_BaseGL.cpp 30 Jan 2003 18:56:55 -0000 1.5 @@ -42,9 +42,6 @@ #include "RenderingContext.h" #include "org_lwjgl_opengl_BaseGL.h" - - - /* * Class: org_lwjgl_opengl_BaseGL * Method: nCreate 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.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- org_lwjgl_Display.cpp 1 Jan 2003 03:58:03 -0000 1.7 +++ org_lwjgl_Display.cpp 30 Jan 2003 18:56:56 -0000 1.8 @@ -36,6 +36,20 @@ RenderingContext * renderingContext; +static int numberForKey( CFDictionaryRef desc, CFStringRef key ) +{ + CFNumberRef value; + int num = 0; + + if ( (value = CFDictionaryGetValue(desc, key)) == NULL ) + { + return 0; + } + + CFNumberGetValue( value, kCFNumberIntType, &num ); + return num; +} + /* * Class: org_lwjgl_Display * Method: getAvailableDisplayModes @@ -44,7 +58,54 @@ JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_Display_getAvailableDisplayModes (JNIEnv * env, jclass clazz) { - return NULL; + CGDirectDisplayID * displays = renderingContext->enumerateDisplays(); + CFArrayRef modeList = renderingContext->enumerateDisplayModes( displays[0] ); + + // count the display modes + // + int cnt = CFArrayGetCount( modeList ); + + // Allocate an array of DisplayModes big enough + jclass displayModeClass = env->FindClass("org/lwjgl/DisplayMode"); + + // Note the * 16 - this is because we are manufacturing available alpha/depth/stencil combos. + jobjectArray ret = env->NewObjectArray(cnt * 16, displayModeClass, NULL); + jmethodID displayModeConstructor = env->GetMethodID(displayModeClass, "<init>", "(IIIIIII)V"); + + CFDictionaryRef mode; + for ( int i=0; i< cnt; i++ ) + { + mode = CFArrayGetValueAtIndex( modeList, i ); + + int width = numberForKey( mode, kCGDisplayWidth ); + int height = numberForKey( mode, kCGDisplayHeight ); + int bpp = numberForKey( mode, kCGDisplayBitsPerPixel ); + int refreshRate = numberForKey( mode, kCGDisplayRefreshRate ); + + if ( bpp <= 8 ) + { + continue; + } + else + { + jobject displayMode; + + for ( int depthBits = 0; depthBits <= 24; depthBits += 8 ) + { + for ( int stencilBits = 0; stencilBits <= 8; stencilBits += 8 ) + { + for ( int alphaBits = 0; alphaBits <= 8; alphaBits += 8 ) + { + displayMode = env->NewObject(displayModeClass, displayModeConstructor, + width, height, bpp, refreshRate, + alphaBits, depthBits, stencilBits ); + + env->SetObjectArrayElement( ret, i, displayMode ); + } + } + } + } + } } /* @@ -66,6 +127,10 @@ jfieldID fid_handle = env->GetStaticFieldID(clazz, "handle", "I"); env->SetStaticIntField(clazz, fid_handle, (jint) renderingContext->windowPtr ); + +#ifdef _DEBUG + printf("Display created\n"); +#endif return JNI_TRUE; } Index: RenderingContext.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/RenderingContext.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/RenderingContext.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- RenderingContext.h 2 Jan 2003 05:44:15 -0000 1.5 +++ RenderingContext.h 30 Jan 2003 18:56:56 -0000 1.6 @@ -45,6 +45,7 @@ #include "extgl.h" #include <Carbon/Carbon.h> +#include <ApplicationServices/ApplicationServices.h> class RenderingContext { @@ -59,6 +60,8 @@ bool createDisplay( int width, int height, int bpp, int freq ); void destroyDisplay(); + CGDirectDisplayID * enumerateDisplays(); + CFArrayRef enumerateDisplayModes( CGDirectDisplayID display ); bool createGL( int colorBits, int alphaBits, int depthBits, int stencilBits ); void destroyGL(); Index: RenderingContext.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/RenderingContext.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/RenderingContext.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- RenderingContext.cpp 2 Jan 2003 05:44:15 -0000 1.5 +++ RenderingContext.cpp 30 Jan 2003 18:56:56 -0000 1.6 @@ -41,6 +41,10 @@ #include "RenderingContext.h" +#define kMaxDisplays 16 + +CGDirectDisplayID display[kMaxDisplays]; + RenderingContext::RenderingContext() { } @@ -78,6 +82,41 @@ // DisposeWindow( windowPtr ); } + +CGDirectDisplayID * RenderingContext::enumerateDisplays() +{ + + CGDisplayCount numDisplays; + CGDisplayErr err; + + err = CGGetActiveDisplayList( kMaxDisplays, + display, + &numDisplays ); + + if ( err != CGDisplayNoErr ) + { + printf("Cannot get displays (%d). \n", err ); + } + + return display; +} + +CFArrayRef RenderingContext::enumerateDisplayModes( CGDirectDisplayID display ) +{ + CFArrayRef modeList; + + modeList = CGDisplayAvailableModes( display ); + if ( modeList = NULL ) + { + printf("Error. Display requested is invalid.\n"); + return NULL; + } + + return modeList; +} + + + bool RenderingContext::createGL( int colorBits, int alphaBits, int depthBits, int stencilBits ) { |