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
(5) |
3
(1) |
4
(1) |
5
|
|
6
|
7
(6) |
8
(2) |
9
(11) |
10
|
11
(1) |
12
|
|
13
(1) |
14
(2) |
15
(30) |
16
(46) |
17
(13) |
18
(2) |
19
|
|
20
(26) |
21
(12) |
22
(9) |
23
(22) |
24
(5) |
25
(2) |
26
|
|
27
|
28
|
|
|
|
|
|
|
From: Elias N. <eli...@us...> - 2005-02-17 12:48:16
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv666/src/java/org/lwjgl Modified Files: BufferChecks.java Log Message: Index: BufferChecks.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/BufferChecks.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- BufferChecks.java 16 Feb 2005 16:04:18 -0000 1.6 +++ BufferChecks.java 17 Feb 2005 12:48:06 -0000 1.7 @@ -63,7 +63,7 @@ */ public static void checkFunctionAddress(long pointer) { if (pointer == 0) { - throw new IllegalStateException("Function is unsupported"); + throw new IllegalStateException("Function is not supported"); } } |
|
From: Elias N. <eli...@us...> - 2005-02-17 12:39:44
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31033/src/native/linux Modified Files: extgl_glx.c extgl_glx.h org_lwjgl_opengl_Display.c org_lwjgl_opengl_Pbuffer.c Log Message: Moved platform specific opengl extension flags into the platform specific files Index: org_lwjgl_opengl_Pbuffer.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- org_lwjgl_opengl_Pbuffer.c 27 Jan 2005 21:26:44 -0000 1.9 +++ org_lwjgl_opengl_Pbuffer.c 17 Feb 2005 12:39:32 -0000 1.10 @@ -53,7 +53,7 @@ static bool isPbuffersSupported() { // Only support the GLX 1.3 Pbuffers and ignore the GLX_SGIX_pbuffer extension - return extgl_Extensions.GLX13 ? org_lwjgl_opengl_Pbuffer_PBUFFER_SUPPORTED : 0; + return extension_flags.GLX13 ? org_lwjgl_opengl_Pbuffer_PBUFFER_SUPPORTED : 0; } JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetPbufferCapabilities Index: extgl_glx.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/extgl_glx.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- extgl_glx.c 10 Sep 2004 08:13:55 -0000 1.1 +++ extgl_glx.c 17 Feb 2005 12:39:32 -0000 1.2 @@ -31,6 +31,8 @@ */ #include "extgl_glx.h" +GLXExtensions extension_flags; + glXGetFBConfigsPROC glXGetFBConfigs = NULL; glXChooseFBConfigPROC glXChooseFBConfig = NULL; glXGetFBConfigAttribPROC glXGetFBConfigAttrib = NULL; @@ -101,8 +103,8 @@ {"glXQueryContext", (void*)&glXQueryContext}, {"glXSelectEvent", (void*)&glXSelectEvent}, {"glXGetSelectedEvent", (void*)&glXGetSelectedEvent}}; - if (extgl_Extensions.GLX13) - extgl_Extensions.GLX13 = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); + if (extension_flags.GLX13) + extension_flags.GLX13 = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); } static bool extgl_InitGLX12(void) @@ -133,32 +135,32 @@ static void extgl_InitGLXSupportedExtensions(JNIEnv *env, Display *disp, int screen) { - extgl_Extensions.GLX_EXT_visual_info = GLXQueryExtension(env, disp, screen, "GLX_EXT_visual_info"); - extgl_Extensions.GLX_EXT_visual_rating = GLXQueryExtension(env, disp, screen, "GLX_EXT_visual_rating"); - extgl_Extensions.GLX_SGI_swap_control = GLXQueryExtension(env, disp, screen, "GLX_SGI_swap_control"); - extgl_Extensions.GLX_ARB_multisample = GLXQueryExtension(env, disp, screen, "GLX_ARB_multisample"); + extension_flags.GLX_EXT_visual_info = GLXQueryExtension(env, disp, screen, "GLX_EXT_visual_info"); + extension_flags.GLX_EXT_visual_rating = GLXQueryExtension(env, disp, screen, "GLX_EXT_visual_rating"); + extension_flags.GLX_SGI_swap_control = GLXQueryExtension(env, disp, screen, "GLX_SGI_swap_control"); + extension_flags.GLX_ARB_multisample = GLXQueryExtension(env, disp, screen, "GLX_ARB_multisample"); } static void extgl_InitGLXSGISwapControl(JNIEnv *env) { ExtFunction functions[] = { {"glXSwapIntervalSGI", (void*)&glXSwapIntervalSGI}}; - if (extgl_Extensions.GLX_SGI_swap_control) - extgl_Extensions.GLX_SGI_swap_control = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); + if (extension_flags.GLX_SGI_swap_control) + extension_flags.GLX_SGI_swap_control = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); } bool extgl_InitGLX(JNIEnv *env, Display *disp, int screen) { int major, minor; /* Assume glx ver >= 1.2 */ - extgl_Extensions.GLX12 = true; + extension_flags.GLX12 = true; if (!extgl_InitGLX12()) return false; extgl_InitGLXSupportedExtensions(env, disp, screen); if (glXQueryVersion(disp, &major, &minor) != True) return false; if (major > 1 || (major == 1 && minor >= 3)) - extgl_Extensions.GLX13 = true; + extension_flags.GLX13 = true; extgl_InitGLX13(env); extgl_InitGLXSGISwapControl(env); return true; 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.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- org_lwjgl_opengl_Display.c 27 Jan 2005 21:26:44 -0000 1.21 +++ org_lwjgl_opengl_Display.c 17 Feb 2005 12:39:32 -0000 1.22 @@ -54,7 +54,7 @@ #include "display.h" #include "org_lwjgl_opengl_LinuxDisplay.h" -#define USEGLX13 extgl_Extensions.GLX13 +#define USEGLX13 extension_flags.GLX13 #define ERR_MSG_SIZE 1024 typedef struct { @@ -511,7 +511,7 @@ putAttrib(&attrib_list, GLX_ACCUM_BLUE_SIZE); putAttrib(&attrib_list, accum_bpe); putAttrib(&attrib_list, GLX_ACCUM_ALPHA_SIZE); putAttrib(&attrib_list, accum_alpha); putAttrib(&attrib_list, GLX_STEREO); putAttrib(&attrib_list, stereo ? True : False); - if (samples > 0 && extgl_Extensions.GLX_ARB_multisample) { + if (samples > 0 && extension_flags.GLX_ARB_multisample) { putAttrib(&attrib_list, GLX_SAMPLE_BUFFERS_ARB); putAttrib(&attrib_list, 1); putAttrib(&attrib_list, GLX_SAMPLES_ARB); putAttrib(&attrib_list, samples); } @@ -573,7 +573,7 @@ putAttrib(&attrib_list, GLX_ACCUM_ALPHA_SIZE); putAttrib(&attrib_list, accum_alpha); if (stereo) putAttrib(&attrib_list, GLX_STEREO); - if (samples > 0 && extgl_Extensions.GLX_ARB_multisample) { + if (samples > 0 && extension_flags.GLX_ARB_multisample) { putAttrib(&attrib_list, GLX_SAMPLE_BUFFERS_ARB); putAttrib(&attrib_list, 1); putAttrib(&attrib_list, GLX_SAMPLES_ARB); putAttrib(&attrib_list, samples); } @@ -591,7 +591,7 @@ glXGetConfig(getDisplay(), vis_info, GLX_ALPHA_SIZE, &alpha); glXGetConfig(getDisplay(), vis_info, GLX_DEPTH_SIZE, &depth); glXGetConfig(getDisplay(), vis_info, GLX_STENCIL_SIZE, &stencil); - if (extgl_Extensions.GLX_ARB_multisample) { + if (extension_flags.GLX_ARB_multisample) { glXGetConfig(getDisplay(), vis_info, GLX_SAMPLE_BUFFERS_ARB, &sample_buffers); glXGetConfig(getDisplay(), vis_info, GLX_SAMPLES_ARB, &samples); } @@ -793,7 +793,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetVSyncEnabled (JNIEnv *env, jobject this, jboolean sync) { - if (extgl_Extensions.GLX_SGI_swap_control) { + if (extension_flags.GLX_SGI_swap_control) { bool vsync = sync == JNI_TRUE ? true : false; if (vsync != vsync_enabled) { int interval = vsync ? 1 : 0; Index: extgl_glx.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/extgl_glx.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- extgl_glx.h 12 Jun 2004 20:28:32 -0000 1.2 +++ extgl_glx.h 17 Feb 2005 12:39:32 -0000 1.3 @@ -312,6 +312,17 @@ /* GLX_SGI_swap_control */ typedef void (APIENTRY * glXSwapIntervalSGIPROC)(int interval); +typedef struct { + bool GLX12; + bool GLX13; + bool GLX_EXT_visual_info; + bool GLX_EXT_visual_rating; + bool GLX_SGI_swap_control; + bool GLX_ARB_multisample; +} GLXExtensions; + +extern GLXExtensions extension_flags; + extern glXGetFBConfigsPROC glXGetFBConfigs; extern glXChooseFBConfigPROC glXChooseFBConfig; extern glXGetFBConfigAttribPROC glXGetFBConfigAttrib; |
|
From: Elias N. <eli...@us...> - 2005-02-17 12:39:43
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31033/src/native/win32 Modified Files: extgl_wgl.c extgl_wgl.h org_lwjgl_opengl_Display.c org_lwjgl_opengl_Pbuffer.c Log Message: Moved platform specific opengl extension flags into the platform specific files Index: org_lwjgl_opengl_Pbuffer.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Pbuffer.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_opengl_Pbuffer.c 29 Jan 2005 10:17:56 -0000 1.8 +++ org_lwjgl_opengl_Pbuffer.c 17 Feb 2005 12:39:33 -0000 1.9 @@ -56,7 +56,7 @@ } PbufferInfo; static bool isPbuffersSupported() { - return extgl_Extensions.WGL_ARB_pixel_format && extgl_Extensions.WGL_ARB_pbuffer; + return extension_flags.WGL_ARB_pixel_format && extension_flags.WGL_ARB_pbuffer; } JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_getPbufferCapabilities @@ -66,13 +66,13 @@ if (isPbuffersSupported()) caps |= org_lwjgl_opengl_Pbuffer_PBUFFER_SUPPORTED; - if (extgl_Extensions.WGL_ARB_render_texture) + if (extension_flags.WGL_ARB_render_texture) caps |= org_lwjgl_opengl_Pbuffer_RENDER_TEXTURE_SUPPORTED; - if (extgl_Extensions.WGL_NV_render_texture_rectangle) + if (extension_flags.WGL_NV_render_texture_rectangle) caps |= org_lwjgl_opengl_Pbuffer_RENDER_TEXTURE_RECTANGLE_SUPPORTED; - if (extgl_Extensions.WGL_NV_render_depth_texture) + if (extension_flags.WGL_NV_render_depth_texture) caps |= org_lwjgl_opengl_Pbuffer_RENDER_DEPTH_TEXTURE_SUPPORTED; return caps; Index: extgl_wgl.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/extgl_wgl.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- extgl_wgl.h 3 Jul 2004 14:39:29 -0000 1.1 +++ extgl_wgl.h 17 Feb 2005 12:39:33 -0000 1.2 @@ -38,6 +38,21 @@ #include <windows.h> +typedef struct { + bool WGL_ARB_buffer_region; + bool WGL_ARB_extensions_string; + bool WGL_ARB_make_current_read; + bool WGL_ARB_multisample; + bool WGL_ARB_pbuffer; + bool WGL_ARB_pixel_format; + bool WGL_ARB_render_texture; + bool WGL_EXT_extensions_string; + bool WGL_EXT_swap_control; + bool WGL_NV_render_depth_texture; + bool WGL_NV_render_texture_rectangle; +} WGLExtensions; + +extern WGLExtensions extension_flags; extern void extgl_InitWGL(JNIEnv *env); @@ -186,4 +201,4 @@ #define WGL_SAMPLES_ARB 0x2042 -#endif \ No newline at end of file +#endif Index: org_lwjgl_opengl_Display.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Display.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- org_lwjgl_opengl_Display.c 16 Feb 2005 13:31:36 -0000 1.14 +++ org_lwjgl_opengl_Display.c 17 Feb 2005 12:39:33 -0000 1.15 @@ -121,7 +121,7 @@ putAttrib(&attrib_list, WGL_ALPHA_BITS_ARB); putAttrib(&attrib_list, alpha); putAttrib(&attrib_list, WGL_DEPTH_BITS_ARB); putAttrib(&attrib_list, depth); putAttrib(&attrib_list, WGL_STENCIL_BITS_ARB); putAttrib(&attrib_list, stencil); - if (samples > 0 && extgl_Extensions.WGL_ARB_multisample) { + if (samples > 0 && extension_flags.WGL_ARB_multisample) { putAttrib(&attrib_list, WGL_SAMPLE_BUFFERS_ARB); putAttrib(&attrib_list, 1); putAttrib(&attrib_list, WGL_SAMPLES_ARB); putAttrib(&attrib_list, samples); } @@ -130,7 +130,7 @@ putAttrib(&attrib_list, WGL_STEREO_ARB); putAttrib(&attrib_list, stereo ? TRUE : FALSE); putAttrib(&attrib_list, WGL_AUX_BUFFERS_ARB); putAttrib(&attrib_list, num_aux_buffers); if ( pixelFormatCaps != NULL ) { - if ( !extgl_Extensions.WGL_ARB_render_texture ) { + if ( !extension_flags.WGL_ARB_render_texture ) { return -1; } @@ -620,7 +620,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_setVSyncEnabled (JNIEnv * env, jobject self, jboolean sync) { - if (extgl_Extensions.WGL_EXT_swap_control) { + if (extension_flags.WGL_EXT_swap_control) { if (sync == JNI_TRUE) { wglSwapIntervalEXT(1); } else { @@ -714,7 +714,7 @@ // Some crazy strangeness here so we can use ARB_pixel_format to specify the number // of multisamples we want. If the extension is present we'll delete the existing // rendering context and start over, using the ARB extension instead to pick the context. - if (!extgl_Extensions.WGL_ARB_pixel_format) + if (!extension_flags.WGL_ARB_pixel_format) return false; pixel_format_index = findPixelFormatARB(env, hdc, pixel_format, NULL, true, true, true, true); if (pixel_format_index == -1) { Index: extgl_wgl.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/extgl_wgl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- extgl_wgl.c 9 Dec 2004 15:36:13 -0000 1.1 +++ extgl_wgl.c 17 Feb 2005 12:39:33 -0000 1.2 @@ -39,6 +39,8 @@ #include "extgl_wgl.h" #include "common_tools.h" +WGLExtensions extension_flags; + /* WGL_EXT_etxension_string */ wglGetExtensionsStringEXTPROC wglGetExtensionsStringEXT = NULL; @@ -100,8 +102,8 @@ {"wglReleasePbufferDCARB", (void **)&wglReleasePbufferDCARB}, {"wglDestroyPbufferARB", (void **)&wglDestroyPbufferARB}, {"wglQueryPbufferARB", (void **)&wglQueryPbufferARB}}; - if (extgl_Extensions.WGL_ARB_pbuffer) - extgl_Extensions.WGL_ARB_pbuffer = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); + if (extension_flags.WGL_ARB_pbuffer) + extension_flags.WGL_ARB_pbuffer = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); } static void extgl_InitWGLARBPixelFormat(JNIEnv *env) @@ -110,8 +112,8 @@ {"wglGetPixelFormatAttribivARB", (void **)&wglGetPixelFormatAttribivARB}, {"wglGetPixelFormatAttribfvARB", (void **)&wglGetPixelFormatAttribfvARB}, {"wglChoosePixelFormatARB", (void **)&wglChoosePixelFormatARB}}; - if (extgl_Extensions.WGL_ARB_pixel_format) - extgl_Extensions.WGL_ARB_pixel_format = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); + if (extension_flags.WGL_ARB_pixel_format) + extension_flags.WGL_ARB_pixel_format = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); } static void extgl_InitWGLARBRenderTexture(JNIEnv *env) @@ -120,8 +122,8 @@ {"wglBindTexImageARB", (void **)&wglBindTexImageARB}, {"wglReleaseTexImageARB", (void **)&wglReleaseTexImageARB}, {"wglSetPbufferAttribARB", (void **)&wglSetPbufferAttribARB}}; - if (extgl_Extensions.WGL_ARB_render_texture) - extgl_Extensions.WGL_ARB_render_texture = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); + if (extension_flags.WGL_ARB_render_texture) + extension_flags.WGL_ARB_render_texture = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); } static void extgl_InitWGLEXTSwapControl(JNIEnv *env) @@ -129,8 +131,8 @@ ExtFunction functions[] = { {"wglSwapIntervalEXT", (void **)&wglSwapIntervalEXT}, {"wglGetSwapIntervalEXT", (void **)&wglGetSwapIntervalEXT}}; - if (extgl_Extensions.WGL_EXT_swap_control) - extgl_Extensions.WGL_EXT_swap_control = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); + if (extension_flags.WGL_EXT_swap_control) + extension_flags.WGL_EXT_swap_control = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); } static void extgl_InitWGLARBMakeCurrentRead(JNIEnv *env) @@ -138,21 +140,21 @@ ExtFunction functions[] = { {"wglMakeContextCurrentARB", (void **)&wglMakeContextCurrentARB}, {"wglGetCurrentReadDCARB", (void **)&wglGetCurrentReadDCARB}}; - if (extgl_Extensions.WGL_ARB_make_current_read) - extgl_Extensions.WGL_ARB_make_current_read = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); + if (extension_flags.WGL_ARB_make_current_read) + extension_flags.WGL_ARB_make_current_read = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); } static void extgl_InitSupportedWGLExtensions(JNIEnv *env) { - extgl_Extensions.WGL_ARB_buffer_region = WGLQueryExtension(env, "WGL_ARB_buffer_region"); - extgl_Extensions.WGL_ARB_make_current_read = WGLQueryExtension(env, "WGL_ARB_make_current_read"); - extgl_Extensions.WGL_ARB_multisample = WGLQueryExtension(env, "WGL_ARB_multisample"); - extgl_Extensions.WGL_ARB_pbuffer = WGLQueryExtension(env, "WGL_ARB_pbuffer"); - extgl_Extensions.WGL_ARB_pixel_format = WGLQueryExtension(env, "WGL_ARB_pixel_format"); - extgl_Extensions.WGL_ARB_render_texture = WGLQueryExtension(env, "WGL_ARB_render_texture"); - extgl_Extensions.WGL_EXT_swap_control = WGLQueryExtension(env, "WGL_EXT_swap_control"); - extgl_Extensions.WGL_NV_render_depth_texture = WGLQueryExtension(env, "WGL_NV_render_depth_texture"); - extgl_Extensions.WGL_NV_render_texture_rectangle = WGLQueryExtension(env, "WGL_NV_render_texture_rectangle"); + extension_flags.WGL_ARB_buffer_region = WGLQueryExtension(env, "WGL_ARB_buffer_region"); + extension_flags.WGL_ARB_make_current_read = WGLQueryExtension(env, "WGL_ARB_make_current_read"); + extension_flags.WGL_ARB_multisample = WGLQueryExtension(env, "WGL_ARB_multisample"); + extension_flags.WGL_ARB_pbuffer = WGLQueryExtension(env, "WGL_ARB_pbuffer"); + extension_flags.WGL_ARB_pixel_format = WGLQueryExtension(env, "WGL_ARB_pixel_format"); + extension_flags.WGL_ARB_render_texture = WGLQueryExtension(env, "WGL_ARB_render_texture"); + extension_flags.WGL_EXT_swap_control = WGLQueryExtension(env, "WGL_EXT_swap_control"); + extension_flags.WGL_NV_render_depth_texture = WGLQueryExtension(env, "WGL_NV_render_depth_texture"); + extension_flags.WGL_NV_render_texture_rectangle = WGLQueryExtension(env, "WGL_NV_render_texture_rectangle"); } void extgl_InitWGL(JNIEnv *env) @@ -161,8 +163,8 @@ {"wglGetExtensionsStringARB", (void **)&wglGetExtensionsStringARB}, {"wglGetExtensionsStringEXT", (void **)&wglGetExtensionsStringEXT}}; extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); - extgl_Extensions.WGL_ARB_extensions_string = wglGetExtensionsStringARB != NULL; - extgl_Extensions.WGL_EXT_extensions_string = wglGetExtensionsStringEXT != NULL; + extension_flags.WGL_ARB_extensions_string = wglGetExtensionsStringARB != NULL; + extension_flags.WGL_EXT_extensions_string = wglGetExtensionsStringEXT != NULL; extgl_InitSupportedWGLExtensions(env); |
|
From: Elias N. <eli...@us...> - 2005-02-17 12:39:43
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31033/src/native/common Modified Files: extgl.c extgl.h Log Message: Moved platform specific opengl extension flags into the platform specific files Index: extgl.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- extgl.c 17 Feb 2005 11:57:33 -0000 1.32 +++ extgl.c 17 Feb 2005 12:39:31 -0000 1.33 @@ -49,10 +49,6 @@ #include <dlfcn.h> #endif -#ifndef _MACOSX -struct ExtensionTypes extgl_Extensions; -#endif - #ifdef _WIN32 HMODULE lib_gl_handle = NULL; #endif Index: extgl.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.h,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- extgl.h 16 Feb 2005 16:04:22 -0000 1.51 +++ extgl.h 17 Feb 2005 12:39:32 -0000 1.52 @@ -158,35 +158,6 @@ /* helper stuff */ -#ifndef _MACOSX -struct ExtensionTypes -{ -#ifdef _WIN32 /* WGL extensions */ - bool WGL_ARB_buffer_region; - bool WGL_ARB_extensions_string; - bool WGL_ARB_make_current_read; - bool WGL_ARB_multisample; - bool WGL_ARB_pbuffer; - bool WGL_ARB_pixel_format; - bool WGL_ARB_render_texture; - bool WGL_EXT_extensions_string; - bool WGL_EXT_swap_control; - bool WGL_NV_render_depth_texture; - bool WGL_NV_render_texture_rectangle; -#endif /* WIN32 */ -#ifdef _X11 - bool GLX12; - bool GLX13; - bool GLX_EXT_visual_info; - bool GLX_EXT_visual_rating; - bool GLX_SGI_swap_control; - bool GLX_ARB_multisample; -#endif /* X11 */ -}; - -extern struct ExtensionTypes extgl_Extensions; -#endif - /* initializes everything, call this right after the rc is created. the function returns true if successful */ extern bool extgl_Open(JNIEnv *env); extern void extgl_Close(void); |
|
From: Elias N. <eli...@us...> - 2005-02-17 12:23:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27070/src/java/org/lwjgl/opengl Modified Files: BufferObjectTracker.java ContextCapabilities.java GLContext.java Log Message: Moved the current BufferObjectInstance into ContextCapabilities to make it ThreadLocal Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- GLContext.java 17 Feb 2005 11:57:34 -0000 1.46 +++ GLContext.java 17 Feb 2005 12:23:38 -0000 1.47 @@ -191,7 +191,6 @@ if (context == null) { ContextCapabilities.unloadAllStubs(); setCapabilities(null); - BufferObjectTracker.setCurrent(null); if (did_auto_load) unloadOpenGLLibrary(); return; @@ -213,7 +212,6 @@ capability_cache.put(context, getCapabilities()); } else setCapabilities(capabilities); - BufferObjectTracker.setCurrent(context); } catch (LWJGLException e) { if (did_auto_load) unloadOpenGLLibrary(); Index: ContextCapabilities.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ContextCapabilities.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ContextCapabilities.java 17 Feb 2005 10:27:12 -0000 1.4 +++ ContextCapabilities.java 17 Feb 2005 12:23:38 -0000 1.5 @@ -6,6 +6,8 @@ import java.util.Set; public class ContextCapabilities { + final BufferObjectTracker tracker; + public final boolean GL_ARB_color_buffer_float; public final boolean GL_ARB_depth_texture; public final boolean GL_ARB_draw_buffers; @@ -1997,6 +1999,7 @@ ContextCapabilities() throws LWJGLException { Set supported_extensions = initAllStubs(); + tracker = new BufferObjectTracker(); this.GL_ARB_color_buffer_float = supported_extensions.contains("GL_ARB_color_buffer_float"); this.GL_ARB_depth_texture = supported_extensions.contains("GL_ARB_depth_texture"); this.GL_ARB_draw_buffers = supported_extensions.contains("GL_ARB_draw_buffers"); Index: BufferObjectTracker.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/BufferObjectTracker.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- BufferObjectTracker.java 15 Feb 2005 11:05:02 -0000 1.4 +++ BufferObjectTracker.java 17 Feb 2005 12:23:38 -0000 1.5 @@ -38,11 +38,6 @@ /** Track Vertex Buffer Objects by context. */ final class BufferObjectTracker { - - private static BufferObjectTracker current_tracker; - - private static final Map contextToTracker = new WeakHashMap(3, 1.0f); - private final StateStack vbo_array_stack; private final StateStack vbo_element_stack; @@ -51,7 +46,7 @@ private final StateStack attrib_stack; - private BufferObjectTracker() { + BufferObjectTracker() { int stack_size = Math.max(1, Util.glGetInteger(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH)); vbo_array_stack = new StateStack(stack_size, 0); @@ -117,39 +112,22 @@ } static StateStack getVBOArrayStack() { - return current_tracker.vbo_array_stack; + return GLContext.getCapabilities().tracker.vbo_array_stack; } static StateStack getVBOElementStack() { - return current_tracker.vbo_element_stack; + return GLContext.getCapabilities().tracker.vbo_element_stack; } static StateStack getPBOPackStack() { - return current_tracker.pbo_pack_stack; + return GLContext.getCapabilities().tracker.pbo_pack_stack; } static StateStack getPBOUnpackStack() { - return current_tracker.pbo_unpack_stack; + return GLContext.getCapabilities().tracker.pbo_unpack_stack; } static StateStack getClientAttribStack() { - return current_tracker.attrib_stack; - } - - /** - * Called after a GLContext has been made current. This will set up the current VBO tracker. - * - * @param context - */ - static void setCurrent(Object context) { - if ( context == null ) { - current_tracker = null; - return; - } - current_tracker = (BufferObjectTracker)contextToTracker.get(context); - if ( current_tracker == null ) { - current_tracker = new BufferObjectTracker(); - contextToTracker.put(context, current_tracker); - } + return GLContext.getCapabilities().tracker.attrib_stack; } } |
|
From: Elias N. <eli...@us...> - 2005-02-17 12:23:46
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27070/src/java/org/lwjgl/generator Modified Files: ContextCapabilitiesGenerator.java Log Message: Moved the current BufferObjectInstance into ContextCapabilities to make it ThreadLocal Index: ContextCapabilitiesGenerator.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator/ContextCapabilitiesGenerator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ContextCapabilitiesGenerator.java 17 Feb 2005 10:27:10 -0000 1.4 +++ ContextCapabilitiesGenerator.java 17 Feb 2005 12:23:38 -0000 1.5 @@ -64,6 +64,8 @@ public static void generateClassPrologue(PrintWriter writer, boolean context_specific) { writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {"); + writer.println("\tfinal BufferObjectTracker tracker;"); + writer.println(); if (!context_specific) { writer.println("\tprivate static boolean " + STUBS_LOADED_NAME + " = false;"); } @@ -72,6 +74,7 @@ public static void generateInitializerPrologue(PrintWriter writer) { writer.println("\t" + Utils.CONTEXT_CAPS_CLASS_NAME + "() throws LWJGLException {"); writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = " + ALL_INIT_METHOD_NAME + "();"); + writer.println("\t\ttracker = new BufferObjectTracker();"); } private static String translateFieldName(String interface_name) { |
|
From: Elias N. <eli...@us...> - 2005-02-17 11:57:43
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20989/src/java/org/lwjgl/opengl Modified Files: GLContext.java Log Message: Clarified comment. Mac OS X: Added debug output Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- GLContext.java 17 Feb 2005 11:09:40 -0000 1.45 +++ GLContext.java 17 Feb 2005 11:57:34 -0000 1.46 @@ -34,10 +34,7 @@ import org.lwjgl.LWJGLException; import org.lwjgl.Sys; -import java.lang.ref.WeakReference; -import java.lang.reflect.Field; import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.util.*; /** @@ -48,8 +45,8 @@ * pointers. * * This class is thread-safe in the sense that multiple threads can safely call all public methods. The class is also - * thread-aware in the sense that it tracks a per-thread current context (and capabilities). That way, multiple threads - * can have multiple contexts current and render to them concurrently. + * thread-aware in the sense that it tracks a per-thread current context (including capabilities and function pointers). + * That way, multiple threads can have multiple contexts current and render to them concurrently. * * @author elias_naur <eli...@us...> * @version $Revision$ |
|
From: Elias N. <eli...@us...> - 2005-02-17 11:57:43
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20989/src/native/common Modified Files: extgl.c Log Message: Clarified comment. Mac OS X: Added debug output Index: extgl.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- extgl.c 9 Feb 2005 10:37:28 -0000 1.31 +++ extgl.c 17 Feb 2005 11:57:33 -0000 1.32 @@ -109,8 +109,10 @@ NSSymbol sym = NSLookupSymbolInImage(opengl_lib_handle, mach_name, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); void *address = NSAddressOfSymbol(sym); return address; - } else + } else { + printfDebug("Could not locate symbol %s\n", name); return NULL; + } #endif } |
|
From: Elias N. <eli...@us...> - 2005-02-17 11:09:51
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10368/src/java/org/lwjgl/opengl Modified Files: GLContext.java Log Message: Implemented capability caching in GLContext Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- GLContext.java 17 Feb 2005 10:27:13 -0000 1.44 +++ GLContext.java 17 Feb 2005 11:09:40 -0000 1.45 @@ -47,11 +47,16 @@ * context. This will ensure that GLContext has an accurate reflection of the current context's capabilities and function * pointers. * + * This class is thread-safe in the sense that multiple threads can safely call all public methods. The class is also + * thread-aware in the sense that it tracks a per-thread current context (and capabilities). That way, multiple threads + * can have multiple contexts current and render to them concurrently. + * * @author elias_naur <eli...@us...> * @version $Revision$ */ public final class GLContext { private final static ThreadLocal current_capabilities = new ThreadLocal(); + private final static Map capability_cache = new WeakHashMap(); /** Map of classes that have native stubs loaded */ private static int gl_ref_count; @@ -171,10 +176,6 @@ } } - private static void loadStubs() throws LWJGLException { - new ContextCapabilities(); - } - /** * Makes a GL context the current LWJGL context by loading GL function pointers. The context must be current before a call to * this method! Instead it simply ensures that the current context is reflected accurately by GLContext's extension caps and @@ -189,13 +190,13 @@ * * @throws LWJGLException if context non-null, and the gl library can't be loaded or the basic GL11 functions can't be loaded */ - public static void useContext(Object context) throws LWJGLException { + public static synchronized void useContext(Object context) throws LWJGLException { if (context == null) { ContextCapabilities.unloadAllStubs(); setCapabilities(null); + BufferObjectTracker.setCurrent(null); if (did_auto_load) unloadOpenGLLibrary(); - BufferObjectTracker.setCurrent(null); return; } if (gl_ref_count == 0) { @@ -203,18 +204,29 @@ did_auto_load = true; } try { - loadStubs(); + ContextCapabilities capabilities = (ContextCapabilities)capability_cache.get(context); + if (capabilities == null) { + /* + * The capabilities object registers itself as current. This behaviour is caused + * by a chicken-and-egg situation where the constructor needs to call GL functions + * as part of its capability discovery, but GL functions cannot be called before + * a capabilities object has been set. + */ + new ContextCapabilities(); + capability_cache.put(context, getCapabilities()); + } else + setCapabilities(capabilities); BufferObjectTracker.setCurrent(context); } catch (LWJGLException e) { - if ( did_auto_load ) + if (did_auto_load) unloadOpenGLLibrary(); throw e; } } /** If the OpenGL reference count is 0, the library is loaded. The reference count is then incremented. */ - public static void loadOpenGLLibrary() throws LWJGLException { - if ( gl_ref_count == 0 ) + public static synchronized void loadOpenGLLibrary() throws LWJGLException { + if (gl_ref_count == 0) nLoadOpenGLLibrary(); gl_ref_count++; } @@ -222,7 +234,7 @@ private static native void nLoadOpenGLLibrary() throws LWJGLException; /** The OpenGL library reference count is decremented, and if it reaches 0, the library is unloaded. */ - public static void unloadOpenGLLibrary() { + public static synchronized void unloadOpenGLLibrary() { gl_ref_count--; if ( gl_ref_count == 0 ) nUnloadOpenGLLibrary(); |
|
From: Elias N. <eli...@us...> - 2005-02-17 10:27:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1811/src/java/org/lwjgl/opengl Modified Files: ContextCapabilities.java GLContext.java Log Message: Moved loaded_stubs from GLContext to ContextCapabilities Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- GLContext.java 17 Feb 2005 09:44:06 -0000 1.43 +++ GLContext.java 17 Feb 2005 10:27:13 -0000 1.44 @@ -56,7 +56,6 @@ /** Map of classes that have native stubs loaded */ private static int gl_ref_count; private static boolean did_auto_load; - private static boolean loaded_stubs; static { Sys.initialize(); @@ -173,10 +172,7 @@ } private static void loadStubs() throws LWJGLException { - if (loaded_stubs) - return; new ContextCapabilities(); - loaded_stubs = true; } /** @@ -194,7 +190,7 @@ * @throws LWJGLException if context non-null, and the gl library can't be loaded or the basic GL11 functions can't be loaded */ public static void useContext(Object context) throws LWJGLException { - if ( context == null ) { + if (context == null) { ContextCapabilities.unloadAllStubs(); setCapabilities(null); if (did_auto_load) @@ -202,8 +198,7 @@ BufferObjectTracker.setCurrent(null); return; } - // Ok, now it's the current context. - if ( gl_ref_count == 0 ) { + if (gl_ref_count == 0) { loadOpenGLLibrary(); did_auto_load = true; } Index: ContextCapabilities.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ContextCapabilities.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ContextCapabilities.java 17 Feb 2005 09:44:05 -0000 1.3 +++ ContextCapabilities.java 17 Feb 2005 10:27:12 -0000 1.4 @@ -1862,6 +1862,7 @@ (NV_vertex_program_glExecuteProgramNV_pointer = GLContext.getFunctionAddress("glExecuteProgramNV")) != 0; } + private Set initAllStubs() throws LWJGLException { if (!GL11_initNativeFunctionAddresses()) throw new LWJGLException("GL11 not supported"); |
|
From: Elias N. <eli...@us...> - 2005-02-17 10:27:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1811/src/java/org/lwjgl/generator Modified Files: ContextCapabilitiesGenerator.java ContextGeneratorProcessorFactory.java Log Message: Moved loaded_stubs from GLContext to ContextCapabilities Index: ContextGeneratorProcessorFactory.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator/ContextGeneratorProcessorFactory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ContextGeneratorProcessorFactory.java 17 Feb 2005 09:44:05 -0000 1.3 +++ ContextGeneratorProcessorFactory.java 17 Feb 2005 10:27:11 -0000 1.4 @@ -114,7 +114,7 @@ writer.println("import org.lwjgl.LWJGLException;"); writer.println("import java.util.Set;"); writer.println(); - ContextCapabilitiesGenerator.generateClassPrologue(writer); + ContextCapabilitiesGenerator.generateClassPrologue(writer, context_specific); DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class); Collection<TypeDeclaration> interface_decls = filter.filter(env.getSpecifiedTypeDeclarations()); for (TypeDeclaration typedecl : interface_decls) { @@ -127,12 +127,13 @@ InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; ContextCapabilitiesGenerator.generateSymbolAddresses(writer, interface_decl); } + writer.println(); if (context_specific) { - writer.println(); for (TypeDeclaration typedecl : interface_decls) { InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; ContextCapabilitiesGenerator.generateAddressesInitializers(writer, interface_decl); } + writer.println(); } ContextCapabilitiesGenerator.generateInitStubsPrologue(writer, context_specific); for (TypeDeclaration typedecl : interface_decls) { @@ -147,14 +148,17 @@ continue; ContextCapabilitiesGenerator.generateInitStubs(writer, interface_decl, context_specific); } - ContextCapabilitiesGenerator.generateInitStubsEpilogue(writer); + ContextCapabilitiesGenerator.generateInitStubsEpilogue(writer, context_specific); writer.println(); writer.println("\tstatic void unloadAllStubs() {"); if (!context_specific) { + writer.println("\t\tif (!loaded_stubs)"); + writer.println("\t\t\treturn;"); for (TypeDeclaration typedecl : interface_decls) { InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; ContextCapabilitiesGenerator.generateUnloadStubs(writer, interface_decl); } + writer.println("\t\tloaded_stubs = false;"); } writer.println("\t}"); writer.println(); Index: ContextCapabilitiesGenerator.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator/ContextCapabilitiesGenerator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ContextCapabilitiesGenerator.java 17 Feb 2005 09:44:05 -0000 1.3 +++ ContextCapabilitiesGenerator.java 17 Feb 2005 10:27:10 -0000 1.4 @@ -55,14 +55,18 @@ * @version $Revision$ */ public class ContextCapabilitiesGenerator { + private final static String STUBS_LOADED_NAME = "loaded_stubs"; private final static String ALL_INIT_METHOD_NAME = "initAllStubs"; private final static String POINTER_INITIALIZER_POSTFIX = "_initNativeFunctionAddresses"; private final static String CACHED_EXTS_VAR_NAME = "supported_extensions"; private final static String EXTENSION_PREFIX = "GL_"; private final static String CORE_PREFIX = "Open"; - public static void generateClassPrologue(PrintWriter writer) { + public static void generateClassPrologue(PrintWriter writer, boolean context_specific) { writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {"); + if (!context_specific) { + writer.println("\tprivate static boolean " + STUBS_LOADED_NAME + " = false;"); + } } public static void generateInitializerPrologue(PrintWriter writer) { @@ -101,6 +105,8 @@ public static void generateInitStubsPrologue(PrintWriter writer, boolean context_specific) { writer.println("\tprivate Set " + ALL_INIT_METHOD_NAME + "() throws LWJGLException {"); if (!context_specific) { + writer.println("\t\tif (" + STUBS_LOADED_NAME + ")"); + writer.println("\t\t\treturn GLContext.getSupportedExtensions();"); writer.println("\t\torg.lwjgl.opengl.GL11.initNativeStubs();"); } else { writer.println("\t\tif (!" + getAddressesInitializerName("GL11") + "())"); @@ -110,7 +116,10 @@ writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = GLContext.getSupportedExtensions();"); } - public static void generateInitStubsEpilogue(PrintWriter writer) { + public static void generateInitStubsEpilogue(PrintWriter writer, boolean context_specific) { + if (!context_specific) { + writer.println("\t\t" + STUBS_LOADED_NAME + " = true;"); + } writer.println("\t\treturn " + CACHED_EXTS_VAR_NAME + ";"); writer.println("\t}"); } |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23204/src/java/org/lwjgl/generator Modified Files: ContextCapabilitiesGenerator.java ContextGeneratorProcessorFactory.java Platform.java RegisterStubsGenerator.java TypeInfo.java Log Message: Fixed NV_vertex_array_range platform specific symbols. Fixed generics warning. Index: Platform.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator/Platform.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Platform.java 15 Feb 2005 11:04:59 -0000 1.1 +++ Platform.java 17 Feb 2005 09:44:05 -0000 1.2 @@ -67,7 +67,18 @@ writer.println("#endif"); } - public String getPostfix() { + public String getOSPrefix() { + switch (this) { + case WGL: + return "Windows"; + case GLX: + return "Linux"; + default: + throw new RuntimeException(this + " has no OS specific prefix"); + } + } + + public String getPrefix() { switch (this) { case WGL: return "wgl"; Index: ContextGeneratorProcessorFactory.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator/ContextGeneratorProcessorFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ContextGeneratorProcessorFactory.java 16 Feb 2005 16:04:18 -0000 1.2 +++ ContextGeneratorProcessorFactory.java 17 Feb 2005 09:44:05 -0000 1.3 @@ -127,10 +127,12 @@ InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; ContextCapabilitiesGenerator.generateSymbolAddresses(writer, interface_decl); } - writer.println(); - for (TypeDeclaration typedecl : interface_decls) { - InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; - ContextCapabilitiesGenerator.generateAddressesInitializers(writer, interface_decl); + if (context_specific) { + writer.println(); + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + ContextCapabilitiesGenerator.generateAddressesInitializers(writer, interface_decl); + } } ContextCapabilitiesGenerator.generateInitStubsPrologue(writer, context_specific); for (TypeDeclaration typedecl : interface_decls) { Index: ContextCapabilitiesGenerator.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator/ContextCapabilitiesGenerator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ContextCapabilitiesGenerator.java 16 Feb 2005 16:04:18 -0000 1.2 +++ ContextCapabilitiesGenerator.java 17 Feb 2005 09:44:05 -0000 1.3 @@ -149,8 +149,30 @@ writer.println("\t\treturn "); while (methods.hasNext()) { MethodDeclaration method = methods.next(); - writer.print("\t\t\t(" + Utils.getFunctionAddressName(d, method) + " = GLContext.getFunctionAddress(\""); - writer.print(method.getSimpleName() + "\")) != 0"); + writer.print("\t\t\t(" + Utils.getFunctionAddressName(d, method) + " = "); + PlatformDependent platform_dependent = method.getAnnotation(PlatformDependent.class); + if (platform_dependent != null) { + EnumSet<Platform> platform_set = EnumSet.copyOf(Arrays.asList(platform_dependent.value())); + writer.print("GLContext.getPlatformSpecificFunctionAddress(\""); + writer.print(Platform.ALL.getPrefix() + "\", "); + writer.print("new String[]{"); + Iterator<Platform> platforms = platform_set.iterator(); + while (platforms.hasNext()) { + writer.print("\"" + platforms.next().getOSPrefix() + "\""); + if(platforms.hasNext()) + writer.print(", "); + } + writer.print("}, new String[]{"); + platforms = platform_set.iterator(); + while (platforms.hasNext()) { + writer.print("\"" + platforms.next().getPrefix() + "\""); + if(platforms.hasNext()) + writer.print(", "); + } + writer.print("}, "); + } else + writer.print("GLContext.getFunctionAddress("); + writer.print("\"" + method.getSimpleName() + "\")) != 0"); if (methods.hasNext()) writer.println(" &&"); } Index: RegisterStubsGenerator.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator/RegisterStubsGenerator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- RegisterStubsGenerator.java 16 Feb 2005 16:04:18 -0000 1.3 +++ RegisterStubsGenerator.java 17 Feb 2005 09:44:05 -0000 1.4 @@ -108,7 +108,7 @@ writer.print(Utils.getQualifiedNativeMethodName(Utils.getQualifiedClassName(d), method, generate_error_checks, context_specific)); if (mode == Mode.BUFFEROBJECT) writer.print(Utils.BUFFER_OBJECT_METHOD_POSTFIX); - String opengl_handle_name = method.getSimpleName().replaceFirst("gl", platform.getPostfix()); + String opengl_handle_name = method.getSimpleName().replaceFirst("gl", platform.getPrefix()); writer.print(", \"" + opengl_handle_name + "\", (void *)&" + method.getSimpleName() + "}"); if (has_more) writer.println(","); Index: TypeInfo.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/generator/TypeInfo.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TypeInfo.java 16 Feb 2005 21:45:57 -0000 1.3 +++ TypeInfo.java 17 Feb 2005 09:44:05 -0000 1.4 @@ -202,7 +202,7 @@ } private static void getCrossProductRecursive(int index, ParameterDeclaration[] parameters, Map<ParameterDeclaration, - Collection<TypeInfo>> typeinfos_map, HashMap<ParameterDeclaration, TypeInfo> current_instance, + Collection<TypeInfo>> typeinfos_map, Map<ParameterDeclaration, TypeInfo> current_instance, Collection<Map<ParameterDeclaration, TypeInfo>> cross_product) { if (index == parameters.length) { cross_product.add(current_instance); @@ -212,7 +212,7 @@ Collection<TypeInfo> typeinfos = typeinfos_map.get(param); if (typeinfos != null) { for (TypeInfo typeinfo : typeinfos) { - HashMap<ParameterDeclaration, TypeInfo> instance = (HashMap<ParameterDeclaration, TypeInfo>)current_instance.clone(); + Map<ParameterDeclaration, TypeInfo> instance = new HashMap<ParameterDeclaration, TypeInfo>(current_instance); instance.put(param, typeinfo); getCrossProductRecursive(index + 1, parameters, typeinfos_map, instance, cross_product); } |
|
From: Elias N. <eli...@us...> - 2005-02-17 09:44:14
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23204/src/java/org/lwjgl/opengl Modified Files: ContextCapabilities.java GLContext.java Log Message: Fixed NV_vertex_array_range platform specific symbols. Fixed generics warning. Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- GLContext.java 16 Feb 2005 21:28:57 -0000 1.42 +++ GLContext.java 17 Feb 2005 09:44:06 -0000 1.43 @@ -84,6 +84,21 @@ /** * Helper method to get a pointer to a named function in the OpenGL library + * with a name dependent on the current platform + */ + static long getPlatformSpecificFunctionAddress(String function_prefix, String[] os_prefixes, String[] os_function_prefixes, String function) { + String os_name = System.getProperty("os.name"); + for (int i = 0; i < os_prefixes.length; i++) + if (os_name.startsWith(os_prefixes[i])) { + String platform_function_name = function.replaceFirst(function_prefix, os_function_prefixes[i]); + long address = getFunctionAddress(platform_function_name); + return address; + } + return 0; + } + + /** + * Helper method to get a pointer to a named function in the OpenGL library */ static native long getFunctionAddress(String name); Index: ContextCapabilities.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ContextCapabilities.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ContextCapabilities.java 16 Feb 2005 16:04:20 -0000 1.2 +++ ContextCapabilities.java 17 Feb 2005 09:44:05 -0000 1.3 @@ -1825,8 +1825,8 @@ private boolean NV_vertex_array_range_initNativeFunctionAddresses() { return - (NV_vertex_array_range_glFreeMemoryNV_pointer = GLContext.getFunctionAddress("glFreeMemoryNV")) != 0 && - (NV_vertex_array_range_glAllocateMemoryNV_pointer = GLContext.getFunctionAddress("glAllocateMemoryNV")) != 0 && + (NV_vertex_array_range_glFreeMemoryNV_pointer = GLContext.getPlatformSpecificFunctionAddress("gl", new String[]{"Windows", "Linux"}, new String[]{"wgl", "glX"}, "glFreeMemoryNV")) != 0 && + (NV_vertex_array_range_glAllocateMemoryNV_pointer = GLContext.getPlatformSpecificFunctionAddress("gl", new String[]{"Windows", "Linux"}, new String[]{"wgl", "glX"}, "glAllocateMemoryNV")) != 0 && (NV_vertex_array_range_glFlushVertexArrayRangeNV_pointer = GLContext.getFunctionAddress("glFlushVertexArrayRangeNV")) != 0 && (NV_vertex_array_range_glVertexArrayRangeNV_pointer = GLContext.getFunctionAddress("glVertexArrayRangeNV")) != 0; } |