You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1
|
2
|
3
|
4
(21) |
5
(8) |
6
|
7
(1) |
8
(24) |
9
|
10
(2) |
11
(1) |
12
(2) |
13
|
14
|
15
(25) |
16
(1) |
17
(8) |
18
(7) |
19
(2) |
20
|
21
|
22
|
23
(7) |
24
(6) |
25
(3) |
26
(8) |
27
(2) |
28
(1) |
29
(3) |
|
|
|
|
|
|
From: <sp...@us...> - 2004-02-29 23:45:39
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/nv In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21166 Modified Files: org_lwjgl_opengl_NVHalfFloat.cpp org_lwjgl_opengl_NVHalfFloat.h Log Message: Removed VertexWeight Index: org_lwjgl_opengl_NVHalfFloat.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/nv/org_lwjgl_opengl_NVHalfFloat.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_NVHalfFloat.cpp 8 Feb 2004 20:28:49 -0000 1.1 +++ org_lwjgl_opengl_NVHalfFloat.cpp 29 Feb 2004 23:27:13 -0000 1.2 @@ -72,8 +72,6 @@ typedef void (APIENTRY * glFogCoordhvNVPROC) (const GLhalf *fog); typedef void (APIENTRY * glSecondaryColor3hNVPROC) (GLhalf red, GLhalf green, GLhalf blue); typedef void (APIENTRY * glSecondaryColor3hvNVPROC) (const GLhalf *v); -typedef void (APIENTRY * glVertexWeighthNVPROC) (GLhalf weight); -typedef void (APIENTRY * glVertexWeighthvNVPROC) (const GLhalf *weight); typedef void (APIENTRY * glVertexAttrib1hNVPROC) (GLuint index, GLhalf x); typedef void (APIENTRY * glVertexAttrib1hvNVPROC) (GLuint index, const GLhalf *v); typedef void (APIENTRY * glVertexAttrib2hNVPROC) (GLuint index, GLhalf x, GLhalf y); @@ -119,8 +117,6 @@ static glFogCoordhvNVPROC glFogCoordhvNV; static glSecondaryColor3hNVPROC glSecondaryColor3hNV; static glSecondaryColor3hvNVPROC glSecondaryColor3hvNV; -static glVertexWeighthNVPROC glVertexWeighthNV; -static glVertexWeighthvNVPROC glVertexWeighthvNV; static glVertexAttrib1hNVPROC glVertexAttrib1hNV; static glVertexAttrib1hvNVPROC glVertexAttrib1hvNV; static glVertexAttrib2hNVPROC glVertexAttrib2hNV; @@ -171,8 +167,6 @@ glFogCoordhvNV = (glFogCoordhvNVPROC) extgl_GetProcAddress("glFogCoordhvNV"); glSecondaryColor3hNV = (glSecondaryColor3hNVPROC) extgl_GetProcAddress("glSecondaryColor3hNV"); glSecondaryColor3hvNV = (glSecondaryColor3hvNVPROC) extgl_GetProcAddress("glSecondaryColor3hvNV"); - glVertexWeighthNV = (glVertexWeighthNVPROC) extgl_GetProcAddress("glVertexWeighthNV"); - glVertexWeighthvNV = (glVertexWeighthvNVPROC) extgl_GetProcAddress("glVertexWeighthvNV"); glVertexAttrib1hNV = (glVertexAttrib1hNVPROC) extgl_GetProcAddress("glVertexAttrib1hNV"); glVertexAttrib1hvNV = (glVertexAttrib1hvNVPROC) extgl_GetProcAddress("glVertexAttrib1hvNV"); glVertexAttrib2hNV = (glVertexAttrib2hNVPROC) extgl_GetProcAddress("glVertexAttrib2hNV"); @@ -383,18 +377,6 @@ /* * Class: org.lwjgl.opengl.NVHalfFloat - * Method: glVertexWeighthNV - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexWeighthNV - (JNIEnv * env, jclass clazz, jshort weight) -{ - CHECK_EXISTS(glVertexWeighthNV) - glVertexWeighthNV(weight); - CHECK_GL_ERROR -} - -/* - * Class: org.lwjgl.opengl.NVHalfFloat * Method: glVertexAttrib1hNV */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib1hNV Index: org_lwjgl_opengl_NVHalfFloat.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/nv/org_lwjgl_opengl_NVHalfFloat.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_NVHalfFloat.h 8 Feb 2004 20:28:48 -0000 1.1 +++ org_lwjgl_opengl_NVHalfFloat.h 29 Feb 2004 23:27:13 -0000 1.2 @@ -157,13 +157,6 @@ /* * Class: org.lwjgl.opengl.NVHalfFloat - * Method: glVertexWeighthNV - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexWeighthNV - (JNIEnv *, jclass, jshort); - -/* - * Class: org.lwjgl.opengl.NVHalfFloat * Method: glVertexAttrib1hNV */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib1hNV |
From: <sp...@us...> - 2004-02-29 23:38:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19553 Modified Files: NVHalfFloat.java Log Message: Removed VertexWeight Index: NVHalfFloat.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVHalfFloat.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NVHalfFloat.java 18 Feb 2004 23:54:45 -0000 1.2 +++ NVHalfFloat.java 29 Feb 2004 23:19:55 -0000 1.3 @@ -83,8 +83,6 @@ public static native void glSecondaryColor3hNV(short red, short green, short blue); - public static native void glVertexWeighthNV(short weight); - public static native void glVertexAttrib1hNV(int index, short x); public static native void glVertexAttrib2hNV(int index, short x, short y); |
From: <eli...@us...> - 2004-02-29 08:42:54
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12083/common Modified Files: extgl.cpp org_lwjgl_opengl_GLContext.cpp Log Message: Moved init of glXGetProcAddress to extgl_Open Index: extgl.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- extgl.cpp 28 Feb 2004 16:59:30 -0000 1.22 +++ extgl.cpp 29 Feb 2004 08:24:56 -0000 1.23 @@ -1064,9 +1064,6 @@ int major, minor; /* Assume glx ver >= 1.2 */ extgl_Extensions.GLX12 = true; - glXGetProcAddressARB = (glXGetProcAddressARBPROC) dlsym(lib_gl_handle, "glXGetProcAddressARB"); - if (glXGetProcAddressARB == NULL) - return false; if (!extgl_InitGLX12()) return false; extgl_InitGLXSupportedExtensions(env, disp, screen); @@ -1273,10 +1270,6 @@ /* extgl_Init the extensions and load all the functions */ bool extgl_Initialize(JNIEnv *env, jobject ext_set) { - if (!extgl_Open()) { - return false; - } - extgl_error = false; extgl_InitOpenGL1_1(); if (extgl_error) @@ -1377,6 +1370,11 @@ printfDebug("Error loading libGL.so.1: %s\n", dlerror()); return false; } + glXGetProcAddressARB = (glXGetProcAddressARBPROC) dlsym(lib_gl_handle, "glXGetProcAddressARB"); + if (glXGetProcAddressARB == NULL) { + extgl_Close(); + return false; + } return true; } Index: org_lwjgl_opengl_GLContext.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLContext.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_GLContext.cpp 24 Feb 2004 14:31:35 -0000 1.2 +++ org_lwjgl_opengl_GLContext.cpp 29 Feb 2004 08:24:56 -0000 1.3 @@ -42,7 +42,12 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_init (JNIEnv * env, jclass clazz, jobject exts) { + if (!extgl_Open()) { + throwException(env, "Failed to load OpenGL library"); + return; + } if (!extgl_Initialize(env, exts)) { throwException(env, "Failed to initialize GL extensions"); + return; } } |
From: <ci...@us...> - 2004-02-28 17:16:56
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13744/src/native/common Modified Files: extgl.cpp Log Message: Fixed JOGL context handling problem Index: extgl.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- extgl.cpp 25 Feb 2004 18:08:57 -0000 1.21 +++ extgl.cpp 28 Feb 2004 16:59:30 -0000 1.22 @@ -1273,6 +1273,10 @@ /* extgl_Init the extensions and load all the functions */ bool extgl_Initialize(JNIEnv *env, jobject ext_set) { + if (!extgl_Open()) { + return false; + } + extgl_error = false; extgl_InitOpenGL1_1(); if (extgl_error) @@ -1349,6 +1353,8 @@ #ifdef _AGL bool extgl_Open(void) { + if (opengl_bundle_ref != NULL) + return true; opengl_bundle_ref = loadBundle("\pOpenGL.framework"); if (opengl_bundle_ref == NULL) return false; @@ -1364,6 +1370,8 @@ #ifdef _X11 bool extgl_Open() { + if (lib_gl_handle != NULL) + return true; lib_gl_handle = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL); if (lib_gl_handle == NULL) { printfDebug("Error loading libGL.so.1: %s\n", dlerror()); @@ -1377,8 +1385,9 @@ #ifdef _WIN32 bool extgl_Open(void) { + if (lib_gl_handle != NULL) + return true; // load the dynamic libraries for OpenGL - // lib_gl_handle = LoadLibrary("opengl32.dll"); if (lib_gl_handle == NULL) return false; @@ -1390,13 +1399,16 @@ { #ifdef _X11 dlclose(lib_gl_handle); + lib_gl_handle = NULL; #endif #ifdef _WIN32 FreeLibrary(lib_gl_handle); + lib_gl_handle = NULL; #endif #ifdef _AGL aglUnloadFramework(opengl_bundle_ref); aglUnloadFramework(agl_bundle_ref); + opengl_bundle_ref = NULL; #endif } |
From: <eli...@us...> - 2004-02-27 10:11:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8662/linux Modified Files: org_lwjgl_Sys.cpp Log Message: alert->nAlert in linux Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Sys.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- org_lwjgl_Sys.cpp 20 Dec 2003 22:03:25 -0000 1.22 +++ org_lwjgl_Sys.cpp 27 Feb 2004 09:54:37 -0000 1.23 @@ -154,12 +154,7 @@ } } -/* - * Class: org_lwjgl_Sys - * Method: alert - * Signature: (Ljava/lang/String;Ljava/lang/String;)V -*/ -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_alert(JNIEnv * env, jclass clazz, jstring title, jstring message) +JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nAlert(JNIEnv * env, jclass clazz, jstring title, jstring message) { jboolean copy = JNI_FALSE; const char * eMessageText = env->GetStringUTFChars(message, ©); |
From: <eli...@us...> - 2004-02-27 08:46:05
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/arb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26863/common/arb Modified Files: org_lwjgl_opengl_ARBShaderObjects.cpp Log Message: Tried to fix g++ compiler errors in ARB_shader_objects.cpp Index: org_lwjgl_opengl_ARBShaderObjects.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/arb/org_lwjgl_opengl_ARBShaderObjects.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_ARBShaderObjects.cpp 8 Feb 2004 20:31:36 -0000 1.1 +++ org_lwjgl_opengl_ARBShaderObjects.cpp 27 Feb 2004 08:29:42 -0000 1.2 @@ -121,6 +121,12 @@ static glGetUniformivARBPROC glGetUniformivARB; static glGetShaderSourceARBPROC glGetShaderSourceARB; +static const int initialSourcesSize = 8; +static int sourcesSize = initialSourcesSize; +static int sourceCount; +static GLcharARB** sources = new GLcharARB*[initialSourcesSize]; +static GLint* sourcesLengths = new GLint[initialSourcesSize]; + void extgl_InitARBShaderObjects(JNIEnv *env, jobject ext_set) { if (!extgl_Extensions.GL_ARB_shader_objects) @@ -169,11 +175,6 @@ EXTGL_SANITY_CHECK(env, ext_set, GL_ARB_shader_objects) } -int sourceCount; -int sourcesSize = 8; -GLcharARB** sources = new GLcharARB*[sourcesSize]; -GLint* sourcesLengths = new GLint[sourcesSize]; - /* * Class: org.lwjgl.opengl.ARBShaderObjects * Method: glDeleteObjectARB |
From: <ma...@us...> - 2004-02-26 22:28:29
|
Update of /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11463 Modified Files: lwjgl.vcproj lwjgl.suo Log Message: updated build file Index: lwjgl.vcproj =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- lwjgl.vcproj 24 Feb 2004 14:31:37 -0000 1.2 +++ lwjgl.vcproj 26 Feb 2004 22:12:25 -0000 1.3 @@ -144,19 +144,19 @@ RelativePath="..\..\src\native\common\extgl.cpp"> </File> <File - RelativePath="..\..\src\native\common\org_lwjgl_openal_ALC.cpp"> + RelativePath="..\..\src\native\common\org_lwjgl_openal_AL.cpp"> </File> <File - RelativePath="..\..\src\native\common\org_lwjgl_openal_BaseAL.cpp"> + RelativePath="..\..\src\native\common\org_lwjgl_openal_AL10.cpp"> </File> <File - RelativePath="..\..\src\native\common\org_lwjgl_openal_CoreAL.cpp"> + RelativePath="..\..\src\native\common\org_lwjgl_openal_ALC.cpp"> </File> <File - RelativePath="..\..\src\native\common\org_lwjgl_openal_eax_BaseEAX.cpp"> + RelativePath="..\..\src\native\common\org_lwjgl_openal_eax_EAX.cpp"> </File> <File - RelativePath="..\..\src\native\common\org_lwjgl_openal_eax_CoreEAX.cpp"> + RelativePath="..\..\src\native\common\org_lwjgl_openal_eax_EAX20.cpp"> </File> <File RelativePath="..\..\src\native\common\org_lwjgl_openal_eax_EAXBufferProperties.cpp"> @@ -179,6 +179,9 @@ <File RelativePath="..\..\src\native\common\org_lwjgl_opengl_GL15.cpp"> </File> + <File + RelativePath="..\..\src\native\common\org_lwjgl_opengl_GLContext.cpp"> + </File> </Filter> <Filter Name="win32" @@ -202,9 +205,6 @@ RelativePath="..\..\src\native\win32\org_lwjgl_input_Mouse.cpp"> </File> <File - RelativePath="..\..\src\native\common\org_lwjgl_opengl_GLContext.cpp"> - </File> - <File RelativePath="..\..\src\native\win32\org_lwjgl_opengl_Pbuffer.cpp"> </File> <File Index: lwjgl.suo =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl.suo,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 Binary files /tmp/cvsDTHBkj and /tmp/cvsPsNe7a differ |
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6858 Modified Files: org_lwjgl_Display.h org_lwjgl_Sys.h org_lwjgl_input_Controller.h org_lwjgl_input_Cursor.h org_lwjgl_input_Keyboard.h org_lwjgl_input_Mouse.h org_lwjgl_openal_AL.h org_lwjgl_openal_AL10.h org_lwjgl_opengl_GL11.h org_lwjgl_opengl_GL12.h org_lwjgl_opengl_GL13.h org_lwjgl_opengl_GL14.h org_lwjgl_opengl_GL15.h org_lwjgl_opengl_GLContext.h Log Message: fresh headers Index: org_lwjgl_Display.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Display.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- org_lwjgl_Display.h 22 Oct 2003 18:34:42 -0000 1.15 +++ org_lwjgl_Display.h 26 Feb 2004 21:54:05 -0000 1.16 @@ -10,7 +10,6 @@ /* Inaccessible static: _00024assertionsDisabled */ /* Inaccessible static: created */ /* Inaccessible static: mode */ -/* Inaccessible static: handle */ /* Inaccessible static: closeRequested */ #undef org_lwjgl_Display_PLATFORM_WGL #define org_lwjgl_Display_PLATFORM_WGL 0L @@ -18,7 +17,7 @@ #define org_lwjgl_Display_PLATFORM_GLX 1L #undef org_lwjgl_Display_PLATFORM_AGL #define org_lwjgl_Display_PLATFORM_AGL 2L -/* Inaccessible static: class_00024org_00024lwjgl_00024Display */ +/* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_Display * Method: init Index: org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- org_lwjgl_Sys.h 20 Dec 2003 22:07:19 -0000 1.19 +++ org_lwjgl_Sys.h 26 Feb 2004 21:54:05 -0000 1.20 @@ -59,10 +59,10 @@ /* * Class: org_lwjgl_Sys - * Method: alert + * Method: nAlert * Signature: (Ljava/lang/String;Ljava/lang/String;)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_alert +JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nAlert (JNIEnv *, jclass, jstring, jstring); /* Index: org_lwjgl_input_Controller.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_input_Controller.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_input_Controller.h 30 Sep 2003 10:52:05 -0000 1.2 +++ org_lwjgl_input_Controller.h 26 Feb 2004 21:54:05 -0000 1.3 @@ -40,7 +40,7 @@ /* Inaccessible static: buttonName */ /* Inaccessible static: buttonMap */ /* Inaccessible static: initialized */ -/* Inaccessible static: class_00024org_00024lwjgl_00024input_00024Controller */ +/* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_input_Controller * Method: nPoll Index: org_lwjgl_input_Cursor.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_input_Cursor.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_input_Cursor.h 8 Oct 2003 07:49:43 -0000 1.5 +++ org_lwjgl_input_Cursor.h 26 Feb 2004 21:54:05 -0000 1.6 @@ -9,7 +9,7 @@ #endif /* Inaccessible static: _00024assertionsDisabled */ /* Inaccessible static: initialized */ -/* Inaccessible static: class_00024org_00024lwjgl_00024input_00024Cursor */ +/* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_input_Cursor * Method: nCreateCursor Index: org_lwjgl_input_Keyboard.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_input_Keyboard.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_input_Keyboard.h 11 Oct 2003 16:29:40 -0000 1.8 +++ org_lwjgl_input_Keyboard.h 26 Feb 2004 21:54:05 -0000 1.9 @@ -273,11 +273,12 @@ /* Inaccessible static: readBuffer */ /* Inaccessible static: translationEnabled */ /* Inaccessible static: numEvents */ -/* Inaccessible static: character */ -/* Inaccessible static: key */ -/* Inaccessible static: state */ +/* Inaccessible static: eventCharacter */ +/* Inaccessible static: eventKey */ +/* Inaccessible static: eventState */ /* Inaccessible static: initialized */ -/* Inaccessible static: class_00024org_00024lwjgl_00024input_00024Keyboard */ +/* Inaccessible static: class_000240 */ +/* Inaccessible static: class_000241 */ /* * Class: org_lwjgl_input_Keyboard * Method: initIDs Index: org_lwjgl_input_Mouse.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_input_Mouse.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- org_lwjgl_input_Mouse.h 11 Oct 2003 16:29:40 -0000 1.10 +++ org_lwjgl_input_Mouse.h 26 Feb 2004 21:54:05 -0000 1.11 @@ -16,6 +16,8 @@ #define org_lwjgl_input_Mouse_CURSOR_ANIMATION 4L /* Inaccessible static: created */ /* Inaccessible static: buttons */ +/* Inaccessible static: x */ +/* Inaccessible static: y */ /* Inaccessible static: dx */ /* Inaccessible static: dy */ /* Inaccessible static: dwheel */ @@ -26,9 +28,9 @@ /* Inaccessible static: buttonMap */ /* Inaccessible static: initialized */ /* Inaccessible static: readBuffer */ -/* Inaccessible static: button */ -/* Inaccessible static: state */ -/* Inaccessible static: class_00024org_00024lwjgl_00024input_00024Mouse */ +/* Inaccessible static: eventButton */ +/* Inaccessible static: eventState */ +/* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_input_Mouse * Method: nGetNativeCursorCaps Index: org_lwjgl_openal_AL.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_AL.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_AL.h 26 Feb 2004 21:51:58 -0000 1.1 +++ org_lwjgl_openal_AL.h 26 Feb 2004 21:54:05 -0000 1.2 @@ -15,8 +15,8 @@ /* Inaccessible static: contextRefresh */ /* Inaccessible static: contextSynchronized */ /* Inaccessible static: created */ -/* Inaccessible static: class_000240 */ -/* Inaccessible static: class_000241 */ +/* Inaccessible static: class_00024org_00024lwjgl_00024openal_00024AL */ +/* Inaccessible static: class_00024java_00024lang_00024String */ /* * Class: org_lwjgl_openal_AL * Method: nCreate Index: org_lwjgl_openal_AL10.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_AL10.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_AL10.h 26 Feb 2004 21:51:58 -0000 1.1 +++ org_lwjgl_openal_AL10.h 26 Feb 2004 21:54:05 -0000 1.2 @@ -126,7 +126,7 @@ #define org_lwjgl_openal_AL10_AL_INVERSE_DISTANCE 53249L #undef org_lwjgl_openal_AL10_AL_INVERSE_DISTANCE_CLAMPED #define org_lwjgl_openal_AL10_AL_INVERSE_DISTANCE_CLAMPED 53250L -/* Inaccessible static: class_000240 */ +/* Inaccessible static: class_00024org_00024lwjgl_00024openal_00024AL10 */ /* * Class: org_lwjgl_openal_AL10 * Method: alEnable Index: org_lwjgl_opengl_GL11.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL11.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_GL11.h 26 Jan 2004 17:12:22 -0000 1.2 +++ org_lwjgl_opengl_GL11.h 26 Feb 2004 21:54:05 -0000 1.3 @@ -7,7 +7,6 @@ #ifdef __cplusplus extern "C" { #endif -/* Inaccessible static: _00024assertionsDisabled */ #undef org_lwjgl_opengl_GL11_GL_ACCUM #define org_lwjgl_opengl_GL11_GL_ACCUM 256L #undef org_lwjgl_opengl_GL11_GL_LOAD @@ -1072,7 +1071,6 @@ #define org_lwjgl_opengl_GL11_GL_LOGIC_OP 3057L #undef org_lwjgl_opengl_GL11_GL_TEXTURE_COMPONENTS #define org_lwjgl_opengl_GL11_GL_TEXTURE_COMPONENTS 4099L -/* Inaccessible static: class_00024org_00024lwjgl_00024opengl_00024GL11 */ /* * Class: org_lwjgl_opengl_GL11 * Method: glAccum Index: org_lwjgl_opengl_GL12.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL12.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_GL12.h 20 Jan 2004 11:19:13 -0000 1.1 +++ org_lwjgl_opengl_GL12.h 26 Feb 2004 21:54:05 -0000 1.2 @@ -7,1081 +7,24 @@ #ifdef __cplusplus extern "C" { #endif -/* Inaccessible static: _00024assertionsDisabled */ -#undef org_lwjgl_opengl_GL12_GL_ACCUM -#define org_lwjgl_opengl_GL12_GL_ACCUM 256L -#undef org_lwjgl_opengl_GL12_GL_LOAD -#define org_lwjgl_opengl_GL12_GL_LOAD 257L -#undef org_lwjgl_opengl_GL12_GL_RETURN -#define org_lwjgl_opengl_GL12_GL_RETURN 258L -#undef org_lwjgl_opengl_GL12_GL_MULT [...1543 lines suppressed...] - -/* - * Class: org_lwjgl_opengl_GL12 - * Method: nglSeparableFilter2D - * Signature: (IIIIIILjava/nio/Buffer;ILjava/nio/Buffer;I)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglSeparableFilter2D - (JNIEnv *, jclass, jint, jint, jint, jint, jint, jint, jobject, jint, jobject, jint); - -/* - * Class: org_lwjgl_opengl_GL12 - * Method: nglGetSeparableFilter - * Signature: (IIILjava/nio/Buffer;ILjava/nio/Buffer;ILjava/nio/Buffer;I)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetSeparableFilter - (JNIEnv *, jclass, jint, jint, jint, jobject, jint, jobject, jint, jobject, jint); - /* * Class: org_lwjgl_opengl_GL12 * Method: nglDrawRangeElements Index: org_lwjgl_opengl_GL13.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL13.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_GL13.h 20 Jan 2004 11:19:13 -0000 1.1 +++ org_lwjgl_opengl_GL13.h 26 Feb 2004 21:54:05 -0000 1.2 @@ -7,1298 +7,6 @@ #ifdef __cplusplus extern "C" { #endif -/* Inaccessible static: _00024assertionsDisabled */ -#undef org_lwjgl_opengl_GL13_GL_ACCUM -#define org_lwjgl_opengl_GL13_GL_ACCUM 256L -#undef org_lwjgl_opengl_GL13_GL_LOAD -#define org_lwjgl_opengl_GL13_GL_LOAD 257L -#undef org_lwjgl_opengl_GL13_GL_RETURN -#define org_lwjgl_opengl_GL13_GL_RETURN 258L -#undef org_lwjgl_opengl_GL13_GL_MULT [...1267 lines suppressed...] -#undef org_lwjgl_opengl_GL13_GL_TABLE_TOO_LARGE -#define org_lwjgl_opengl_GL13_GL_TABLE_TOO_LARGE 32817L -#undef org_lwjgl_opengl_GL13_GL_BLEND_EQUATION -#define org_lwjgl_opengl_GL13_GL_BLEND_EQUATION 32777L -#undef org_lwjgl_opengl_GL13_GL_MIN -#define org_lwjgl_opengl_GL13_GL_MIN 32775L -#undef org_lwjgl_opengl_GL13_GL_MAX -#define org_lwjgl_opengl_GL13_GL_MAX 32776L -#undef org_lwjgl_opengl_GL13_GL_FUNC_ADD -#define org_lwjgl_opengl_GL13_GL_FUNC_ADD 32774L -#undef org_lwjgl_opengl_GL13_GL_FUNC_SUBTRACT -#define org_lwjgl_opengl_GL13_GL_FUNC_SUBTRACT 32778L -#undef org_lwjgl_opengl_GL13_GL_FUNC_REVERSE_SUBTRACT -#define org_lwjgl_opengl_GL13_GL_FUNC_REVERSE_SUBTRACT 32779L -#undef org_lwjgl_opengl_GL13_GL_BLEND_COLOR -#define org_lwjgl_opengl_GL13_GL_BLEND_COLOR 32773L -/* Inaccessible static: class_00024org_00024lwjgl_00024opengl_00024GL12 */ #undef org_lwjgl_opengl_GL13_GL_TEXTURE0 #define org_lwjgl_opengl_GL13_GL_TEXTURE0 33984L #undef org_lwjgl_opengl_GL13_GL_TEXTURE1 Index: org_lwjgl_opengl_GL14.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL14.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_GL14.h 17 Feb 2004 21:36:17 -0000 1.2 +++ org_lwjgl_opengl_GL14.h 26 Feb 2004 21:54:05 -0000 1.3 @@ -7,1486 +7,6 @@ #ifdef __cplusplus extern "C" { #endif -#undef org_lwjgl_opengl_GL14_GL_ACCUM -#define org_lwjgl_opengl_GL14_GL_ACCUM 256L -#undef org_lwjgl_opengl_GL14_GL_LOAD -#define org_lwjgl_opengl_GL14_GL_LOAD 257L -#undef org_lwjgl_opengl_GL14_GL_RETURN -#define org_lwjgl_opengl_GL14_GL_RETURN 258L -#undef org_lwjgl_opengl_GL14_GL_MULT -#define org_lwjgl_opengl_GL14_GL_MULT 259L [...1455 lines suppressed...] -#define org_lwjgl_opengl_GL14_GL_ADD_SIGNED 34164L -#undef org_lwjgl_opengl_GL14_GL_INTERPOLATE -#define org_lwjgl_opengl_GL14_GL_INTERPOLATE 34165L -#undef org_lwjgl_opengl_GL14_GL_SUBTRACT -#define org_lwjgl_opengl_GL14_GL_SUBTRACT 34023L -#undef org_lwjgl_opengl_GL14_GL_CONSTANT -#define org_lwjgl_opengl_GL14_GL_CONSTANT 34166L -#undef org_lwjgl_opengl_GL14_GL_PRIMARY_COLOR -#define org_lwjgl_opengl_GL14_GL_PRIMARY_COLOR 34167L -#undef org_lwjgl_opengl_GL14_GL_PREVIOUS -#define org_lwjgl_opengl_GL14_GL_PREVIOUS 34168L -#undef org_lwjgl_opengl_GL14_GL_DOT3_RGB -#define org_lwjgl_opengl_GL14_GL_DOT3_RGB 34478L -#undef org_lwjgl_opengl_GL14_GL_DOT3_RGBA -#define org_lwjgl_opengl_GL14_GL_DOT3_RGBA 34479L -#undef org_lwjgl_opengl_GL14_GL_CLAMP_TO_BORDER -#define org_lwjgl_opengl_GL14_GL_CLAMP_TO_BORDER 33069L #undef org_lwjgl_opengl_GL14_GL_GENERATE_MIPMAP #define org_lwjgl_opengl_GL14_GL_GENERATE_MIPMAP 33169L #undef org_lwjgl_opengl_GL14_GL_GENERATE_MIPMAP_HINT Index: org_lwjgl_opengl_GL15.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL15.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_GL15.h 15 Feb 2004 15:21:24 -0000 1.1 +++ org_lwjgl_opengl_GL15.h 26 Feb 2004 21:54:05 -0000 1.2 @@ -1,132 +1,173 @@ -/* -* Copyright (c) 2002 Lightweight 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. -*/ - -// ---------------------------------- -// MACHINE GENERATED HEADER OF CLASS: org.lwjgl.opengl.GL15 -// ---------------------------------- - +/* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> +/* Header for class org_lwjgl_opengl_GL15 */ #ifndef _Included_org_lwjgl_opengl_GL15 #define _Included_org_lwjgl_opengl_GL15 - #ifdef __cplusplus extern "C" { #endif - -// ---------------------------------------------------------------------- -// ---------------------- ARB_vertex_buffer_object ---------------------- -// ---------------------------------------------------------------------- - +/* Inaccessible static: _00024assertionsDisabled */ +#undef org_lwjgl_opengl_GL15_GL_ARRAY_BUFFER +#define org_lwjgl_opengl_GL15_GL_ARRAY_BUFFER 34962L +#undef org_lwjgl_opengl_GL15_GL_ELEMENT_ARRAY_BUFFER +#define org_lwjgl_opengl_GL15_GL_ELEMENT_ARRAY_BUFFER 34963L +#undef org_lwjgl_opengl_GL15_GL_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_ARRAY_BUFFER_BINDING 34964L +#undef org_lwjgl_opengl_GL15_GL_ELEMENT_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_ELEMENT_ARRAY_BUFFER_BINDING 34965L +#undef org_lwjgl_opengl_GL15_GL_VERTEX_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_VERTEX_ARRAY_BUFFER_BINDING 34966L +#undef org_lwjgl_opengl_GL15_GL_NORMAL_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_NORMAL_ARRAY_BUFFER_BINDING 34967L +#undef org_lwjgl_opengl_GL15_GL_COLOR_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_COLOR_ARRAY_BUFFER_BINDING 34968L +#undef org_lwjgl_opengl_GL15_GL_INDEX_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_INDEX_ARRAY_BUFFER_BINDING 34969L +#undef org_lwjgl_opengl_GL15_GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 34970L +#undef org_lwjgl_opengl_GL15_GL_EDGE_FLAG_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 34971L +#undef org_lwjgl_opengl_GL15_GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 34972L +#undef org_lwjgl_opengl_GL15_GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 34973L +#undef org_lwjgl_opengl_GL15_GL_WEIGHT_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_WEIGHT_ARRAY_BUFFER_BINDING 34974L +#undef org_lwjgl_opengl_GL15_GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING +#define org_lwjgl_opengl_GL15_GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 34975L +#undef org_lwjgl_opengl_GL15_GL_STREAM_DRAW +#define org_lwjgl_opengl_GL15_GL_STREAM_DRAW 35040L +#undef org_lwjgl_opengl_GL15_GL_STREAM_READ +#define org_lwjgl_opengl_GL15_GL_STREAM_READ 35041L +#undef org_lwjgl_opengl_GL15_GL_STREAM_COPY +#define org_lwjgl_opengl_GL15_GL_STREAM_COPY 35042L +#undef org_lwjgl_opengl_GL15_GL_STATIC_DRAW +#define org_lwjgl_opengl_GL15_GL_STATIC_DRAW 35044L +#undef org_lwjgl_opengl_GL15_GL_STATIC_READ +#define org_lwjgl_opengl_GL15_GL_STATIC_READ 35045L +#undef org_lwjgl_opengl_GL15_GL_STATIC_COPY +#define org_lwjgl_opengl_GL15_GL_STATIC_COPY 35046L +#undef org_lwjgl_opengl_GL15_GL_DYNAMIC_DRAW +#define org_lwjgl_opengl_GL15_GL_DYNAMIC_DRAW 35048L +#undef org_lwjgl_opengl_GL15_GL_DYNAMIC_READ +#define org_lwjgl_opengl_GL15_GL_DYNAMIC_READ 35049L +#undef org_lwjgl_opengl_GL15_GL_DYNAMIC_COPY +#define org_lwjgl_opengl_GL15_GL_DYNAMIC_COPY 35050L +#undef org_lwjgl_opengl_GL15_GL_READ_ONLY +#define org_lwjgl_opengl_GL15_GL_READ_ONLY 35000L +#undef org_lwjgl_opengl_GL15_GL_WRITE_ONLY +#define org_lwjgl_opengl_GL15_GL_WRITE_ONLY 35001L +#undef org_lwjgl_opengl_GL15_GL_READ_WRITE +#define org_lwjgl_opengl_GL15_GL_READ_WRITE 35002L +#undef org_lwjgl_opengl_GL15_GL_BUFFER_SIZE +#define org_lwjgl_opengl_GL15_GL_BUFFER_SIZE 34660L +#undef org_lwjgl_opengl_GL15_GL_BUFFER_USAGE +#define org_lwjgl_opengl_GL15_GL_BUFFER_USAGE 34661L +#undef org_lwjgl_opengl_GL15_GL_BUFFER_ACCESS +#define org_lwjgl_opengl_GL15_GL_BUFFER_ACCESS 35003L +#undef org_lwjgl_opengl_GL15_GL_BUFFER_MAPPED +#define org_lwjgl_opengl_GL15_GL_BUFFER_MAPPED 35004L +#undef org_lwjgl_opengl_GL15_GL_BUFFER_MAP_POINTER +#define org_lwjgl_opengl_GL15_GL_BUFFER_MAP_POINTER 35005L +#undef org_lwjgl_opengl_GL15_GL_SAMPLES_PASSED +#define org_lwjgl_opengl_GL15_GL_SAMPLES_PASSED 35092L +#undef org_lwjgl_opengl_GL15_GL_QUERY_COUNTER_BITS +#define org_lwjgl_opengl_GL15_GL_QUERY_COUNTER_BITS 34916L +#undef org_lwjgl_opengl_GL15_GL_CURRENT_QUERY +#define org_lwjgl_opengl_GL15_GL_CURRENT_QUERY 34917L +#undef org_lwjgl_opengl_GL15_GL_QUERY_RESULT +#define org_lwjgl_opengl_GL15_GL_QUERY_RESULT 34918L +#undef org_lwjgl_opengl_GL15_GL_QUERY_RESULT_AVAILABLE +#define org_lwjgl_opengl_GL15_GL_QUERY_RESULT_AVAILABLE 34919L +/* Inaccessible static: class_000240 */ /* - * Class: org.lwjgl.opengl.GL15 - * Method: nglBindBuffer + * Class: org_lwjgl_opengl_GL15 + * Method: nglBindBuffer + * Signature: (II)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglBindBuffer - (JNIEnv *, jclass, jint, jint); + (JNIEnv *, jclass, jint, jint); /* - * Class: org.lwjgl.opengl.GL15 - * Method: nglDeleteBuffers + * Class: org_lwjgl_opengl_GL15 + * Method: nglDeleteBuffers + * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglDeleteBuffers - (JNIEnv *, jclass, jint, jobject, jint); + (JNIEnv *, jclass, jint, jobject, jint); /* - * Class: org.lwjgl.opengl.GL15 - * Method: nglGenBuffers + * Class: org_lwjgl_opengl_GL15 + * Method: nglGenBuffers + * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglGenBuffers - (JNIEnv *, jclass, jint, jobject, jint); + (JNIEnv *, jclass, jint, jobject, jint); /* - * Class: org.lwjgl.opengl.GL15 - * Method: glIsBuffer + * Class: org_lwjgl_opengl_GL15 + * Method: glIsBuffer + * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL15_glIsBuffer - (JNIEnv *, jclass, jint); + (JNIEnv *, jclass, jint); /* - * Class: org.lwjgl.opengl.GL15 - * Method: nglBufferData + * Class: org_lwjgl_opengl_GL15 + * Method: nglBufferData + * Signature: (IILjava/nio/Buffer;II)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglBufferData - (JNIEnv *, jclass, jint, jint, jobject, jint, jint); + (JNIEnv *, jclass, jint, jint, jobject, jint, jint); /* - * Class: org.lwjgl.opengl.GL15 - * Method: nglBufferSubData + * Class: org_lwjgl_opengl_GL15 + * Method: nglBufferSubData + * Signature: (IIILjava/nio/Buffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglBufferSubData - (JNIEnv *, jclass, jint, jint, jint, jobject, jint); + (JNIEnv *, jclass, jint, jint, jint, jobject, jint); /* - * Class: org.lwjgl.opengl.GL15 - * Method: nglGetBufferSubData + * Class: org_lwjgl_opengl_GL15 + * Method: nglGetBufferSubData + * Signature: (IIILjava/nio/Buffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglGetBufferSubData - (JNIEnv *, jclass, jint, jint, jint, jobject, jint); + (JNIEnv *, jclass, jint, jint, jint, jobject, jint); /* - * Class: org.lwjgl.opengl.GL15 - * Method: glMapBuffer + * Class: org_lwjgl_opengl_GL15 + * Method: glMapBuffer + * Signature: (IIILjava/nio/ByteBuffer;)Ljava/nio/ByteBuffer; */ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_GL15_glMapBuffer - (JNIEnv *, jclass, jint, jint, jint, jobject); + (JNIEnv *, jclass, jint, jint, jint, jobject); /* - * Class: org.lwjgl.opengl.GL15 - * Method: glUnmapBuffer + * Class: org_lwjgl_opengl_GL15 + * Method: glUnmapBuffer + * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL15_glUnmapBuffer - (JNIEnv *, jclass, jint); + (JNIEnv *, jclass, jint); /* - * Class: org.lwjgl.opengl.GL15 - * Method: nglGetBufferParameteriv + * Class: org_lwjgl_opengl_GL15 + * Method: nglGetBufferParameteriv + * Signature: (IILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglGetBufferParameteriv - (JNIEnv *, jclass, jint, jint, jobject, jint); + (JNIEnv *, jclass, jint, jint, jobject, jint); /* - * Class: org.lwjgl.opengl.GL15 - * Method: glGetBufferPointer + * Class: org_lwjgl_opengl_GL15 + * Method: glGetBufferPointer + * Signature: (III)Ljava/nio/ByteBuffer; */ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_GL15_glGetBufferPointer - (JNIEnv *, jclass, jint, jint, jint); - -// ----------------------------------------------------------------- -// ---------------------- ARB_occlusion_query ---------------------- -// ----------------------------------------------------------------- + (JNIEnv *, jclass, jint, jint, jint); /* * Class: org_lwjgl_opengl_GL15 @@ -195,5 +236,4 @@ #ifdef __cplusplus } #endif - #endif Index: org_lwjgl_opengl_GLContext.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLContext.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_GLContext.h 24 Feb 2004 14:31:35 -0000 1.2 +++ org_lwjgl_opengl_GLContext.h 26 Feb 2004 21:54:05 -0000 1.3 @@ -8,8 +8,6 @@ extern "C" { #endif /* Inaccessible static: currentContext */ -/* Inaccessible static: contextMap */ -/* Inaccessible static: extensionsMap */ /* Inaccessible static: GL_ARB_imaging */ /* Inaccessible static: GL_ARB_depth_texture */ /* Inaccessible static: GL_ARB_fragment_program */ @@ -76,8 +74,6 @@ /* Inaccessible static: GL_ATI_vertex_attrib_array_object */ /* Inaccessible static: GL_ATI_vertex_streams */ /* Inaccessible static: GL_ATI_separate_stencil */ -/* Inaccessible static: GL_ATIX_point_sprites */ -/* Inaccessible static: GL_ATIX_texture_env_route */ /* Inaccessible static: GL_NV_blend_square */ /* Inaccessible static: GL_NV_copy_depth_to_color */ /* Inaccessible static: GL_NV_depth_clamp */ |
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6429/native/common Modified Files: Makefile.am Added Files: org_lwjgl_openal_AL.cpp org_lwjgl_openal_AL.h org_lwjgl_openal_AL10.cpp org_lwjgl_openal_AL10.h org_lwjgl_openal_eax_EAX.cpp org_lwjgl_openal_eax_EAX.h org_lwjgl_openal_eax_EAX20.cpp org_lwjgl_openal_eax_EAX20.h Removed Files: org_lwjgl_openal_BaseAL.cpp org_lwjgl_openal_BaseAL.h org_lwjgl_openal_CoreAL.cpp org_lwjgl_openal_CoreAL.h org_lwjgl_openal_eax_BaseEAX.cpp org_lwjgl_openal_eax_BaseEAX.h org_lwjgl_openal_eax_CoreEAX.cpp org_lwjgl_openal_eax_CoreEAX.h Log Message: OpenAL / EAX Refactor --- NEW FILE: org_lwjgl_openal_AL.cpp --- /* * Copyright (c) 2002-2004 Lightweight 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 'Lightweight 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. */ #include "org_lwjgl_openal_AL.h" /* OpenAL includes */ #include "checkALerror.h" #include "extal.h" JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_nCreate (JNIEnv *env, jclass clazz, jobjectArray oalPaths) { InitializeOpenAL(env, oalPaths); } JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_nDestroy(JNIEnv *env, jclass clazz) { DeInitializeOpenAL(); } --- NEW FILE: org_lwjgl_openal_AL.h --- /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_openal_AL */ #ifndef _Included_org_lwjgl_openal_AL #define _Included_org_lwjgl_openal_AL #ifdef __cplusplus extern "C" { #endif /* Inaccessible static: alc */ /* Inaccessible static: device */ /* Inaccessible static: context */ /* Inaccessible static: deviceArguments */ /* Inaccessible static: contextFrequency */ /* Inaccessible static: contextRefresh */ /* Inaccessible static: contextSynchronized */ /* Inaccessible static: created */ /* Inaccessible static: class_000240 */ /* Inaccessible static: class_000241 */ /* * Class: org_lwjgl_openal_AL * Method: nCreate * Signature: ([Ljava/lang/String;)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_nCreate (JNIEnv *, jclass, jobjectArray); /* * Class: org_lwjgl_openal_AL * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_nDestroy (JNIEnv *, jclass); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_openal_AL10.cpp --- /* * Copyright (c) 2002-2004 Lightweight 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 'Lightweight 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_openal_AL10.cpp,v 1.1 2004/02/26 21:51:58 matzon Exp $ * * This is the actual JNI implementation of the OpenAL core. It handles * whatever is needed for proper OpenAL support via using Java. * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ #include "org_lwjgl_openal_AL10.h" /* OpenAL includes */ #include "checkALerror.h" #include "extal.h" /** * This function enables a feature of the OpenAL driver. * * C Specification: * ALvoid alEnable(ALenum capability); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alEnable (JNIEnv *env, jclass clazz, jint capability) { alEnable((ALenum) capability); CHECK_AL_ERROR } /** * This function disables a feature of the OpenAL driver. * * C Specification: * ALvoid alDisable(ALenum capability); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alDisable (JNIEnv *env, jclass clazz, jint capability) { alDisable((ALenum) capability); CHECK_AL_ERROR } /** * This function returns a boolean indicating if a specific feature is enabled in the OpenAL driver. * * C Specification: * Alboolean alIsEnabled(ALenum capability); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_AL10_alIsEnabled (JNIEnv *env, jclass clazz, jint capability) { jboolean result = (jboolean) alIsEnabled((ALenum) capability); CHECK_AL_ERROR return result; } /** * This function Enables a feature of the OpenAL driver. * * C Specification * ALvoid alHint(ALenum target, ALenum mode); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alHint (JNIEnv *env, jclass clazz, jint target, jint mode) { //alHint((ALint)target, (ALint)mode); //cannot link with above statement return; } /** * This function returns a boolean OpenAL state. * * C Specification: * Alboolean alGetBoolean(ALenum pname); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_AL10_alGetBoolean (JNIEnv *env, jclass clazz, jint pname) { jboolean result = (jboolean) alGetBoolean((ALenum) pname); CHECK_AL_ERROR return result; } /** * This function returns an integer OpenAL state. * * C Specification: * Alint alGetInteger(ALenum pname); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetInteger (JNIEnv *env, jclass clazz, jint pname) { jint result = (jint) alGetInteger((ALenum) pname); CHECK_AL_ERROR return result; } /** * This function returns a floating point OpenAL state. * * C Specification: * ALfloat alGetFloat(ALenum pname); */ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_AL10_alGetFloat (JNIEnv *env, jclass clazz, jint pname) { jfloat result = (jfloat) alGetFloat((ALenum) pname); CHECK_AL_ERROR return result; } /** * This function retrieves a floating point OpenAL state. * * C Specification: * ALvoid alGetFloatv(ALenum pname,ALfloat *data); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGetFloatv (JNIEnv *env, jclass clazz, jint pname, jobject data, int offset) { alGetFloatv((ALenum) pname, offset + (ALfloat*) env->GetDirectBufferAddress(data)); CHECK_AL_ERROR } /** * This function retrieves an OpenAL string property. * * C Specification: * ALubyte * alGetString(ALenum pname); */ JNIEXPORT jstring JNICALL Java_org_lwjgl_openal_AL10_alGetString (JNIEnv *env, jclass clazz, jint param) { jstring string = env->NewStringUTF((char*) alGetString(param)); CHECK_AL_ERROR return string; } /** * This function returns the current error state and then clears the error state. * * C Specification: * ALenum alGetError(ALvoid); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetError (JNIEnv *env, jclass clazz) { jint result = (jint) alGetError(); // Don't think we should be checking for errors here..? // CHECK_AL_ERROR return result; } /** * This function tests if a specific extension is available for the OpenAL driver. * * C Specification: * ALboolean alIsExtensionPresent(ALubyte *extName); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_AL10_alIsExtensionPresent (JNIEnv *env, jclass clazz, jstring fname) { ALubyte* functionname = (ALubyte*) (env->GetStringUTFChars(fname, 0)); jboolean result = (jboolean) alIsExtensionPresent(functionname); env->ReleaseStringUTFChars((jstring)functionname, 0); CHECK_AL_ERROR return result; } /** * This function returns the enumeration value of an OpenAL enum described by a string. * * C Specification: * ALenum alGetEnumValue(ALubyte *enumName); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetEnumValue (JNIEnv *env, jclass clazz, jstring ename) { ALubyte* functionname = (ALubyte*) (env->GetStringUTFChars(ename, 0)); jint result = (jint) alGetEnumValue(functionname); env->ReleaseStringUTFChars((jstring)functionname, 0); CHECK_AL_ERROR return result; } /** * This function sets an integer property of the listener. * * C Specification: * ALvoid alListeneri(ALenum pname,ALint value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alListeneri (JNIEnv *env, jclass clazz, jint pname, jint value) { alListeneri((ALenum) pname, (ALint) value); CHECK_AL_ERROR } /** * This function sets a floating point property for the listener. * * C Specification: * ALvoid alListenerf(ALenum pname,ALfloat value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alListenerf (JNIEnv *env, jclass clazz, jint pname, jfloat value) { alListenerf((ALenum) pname, (ALfloat) value); CHECK_AL_ERROR } /* * Class: org_lwjgl_openal_AL10 * Method: nalListenerf * Signature: (ILjava/nio/FloatBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalListenerfv (JNIEnv *env, jclass clazz, jint pname, jobject values, jint offset) { alListenerfv((ALenum) pname, offset + (ALfloat*) env->GetDirectBufferAddress(values)); } /** * This function sets a floating point property for the listener. * * C Specification: * ALvoid alListener3f(ALenum pname,ALfloat v1,ALfloat v2,ALfloat v3); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alListener3f (JNIEnv *env, jclass clazz, jint pname, jfloat v1, jfloat v2, jfloat v3) { alListener3f((ALenum) pname, (ALfloat) v1, (ALfloat) v2, (ALfloat) v3); CHECK_AL_ERROR } /** * This function retrieves an integer property of the listener. * * C Specification: * ALvoid alGetListeneri(ALenum pname,ALint *value); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetListeneri (JNIEnv *env, jclass clazz, jint pname) { ALint value = 0; alGetListeneri((ALenum) pname, &value); CHECK_AL_ERROR return value; } /** * This function retrieves a floating point property of the listener. * * C Specification: * ALvoid alGetListenerf(ALenum pname,ALfloat *value); */ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_AL10_alGetListenerf (JNIEnv *env, jclass clazz, jint pname) { ALfloat value = 0.0f; alGetListenerf((ALenum) pname, &value); CHECK_AL_ERROR return value; } /** * This function retrieves a floating point-vector property of the listener. * * C Specification: * ALvoid alGetListenerfv(ALenum pname,ALfloat *values); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGetListenerfv (JNIEnv *env, jclass clazz, jint pname, jobject values, jint offset) { alGetListenerfv((ALenum) pname, offset + (ALfloat*) env->GetDirectBufferAddress(values)); CHECK_AL_ERROR } /** * This function generates one or more sources. * * C Specification: * ALvoid alGenSources(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGenSources (JNIEnv *env, jclass clazz, jint n, jobject sources, jint offset) { alGenSources(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } /** * This function deletes one or more sources. * * C Specification: * ALvoid alDeleteSources(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalDeleteSources (JNIEnv *env, jclass clazz, jint n, jobject sources, jint offset) { alDeleteSources(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } /** * This function tests if a source name is valid. * * C Specification: * Alboolean alIsSource(ALuint source); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_AL10_alIsSource (JNIEnv *env, jclass clazz, jint source) { jboolean result = (jboolean) alIsSource((ALuint) source); CHECK_AL_ERROR return result; } /** * This function sets an integer property of a source. * * C Specification: * ALvoid alSourcei(ALuint source,ALenum pname,ALint value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourcei (JNIEnv *env, jclass clazz, jint source, jint pname, jint value) { alSourcei((ALuint) source, (ALenum) pname, (ALint) value); CHECK_AL_ERROR } /** * This function sets a floating point property of a source. * * C Specification: * ALvoid alSourcef(ALuint source,ALenum pname,ALfloat value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourcef (JNIEnv *env, jclass clazz, jint source, jint pname, jfloat value) { alSourcef((ALuint) source, (ALenum) pname, (ALfloat) value); CHECK_AL_ERROR } /* * Class: org_lwjgl_openal_AL10 * Method: nalSourcefv * Signature: (IILjava/nio/FloatBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourcefv (JNIEnv *env, jclass clazz, jint source, jint pname, jobject values, jint offset) { alSourcefv((ALuint) source, (ALenum) pname, offset + (ALfloat*) env->GetDirectBufferAddress(values)); CHECK_AL_ERROR } /** * This function sets a source property requiring three floating point values. * C Specification: * ALvoid alSource3f(ALuint source,ALenum pname,ALfloat v1,ALfloat v2,ALfloat v3); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSource3f (JNIEnv *env, jclass clazz, jint source, jint pname, jfloat v1, jfloat v2, jfloat v3) { alSource3f((ALuint) source, (ALenum) pname, (ALfloat) v1, (ALfloat) v2, (ALfloat) v3); CHECK_AL_ERROR } /** * This function retrieves an integer property of a source. * C Specification: * ALvoid alGetSourcei(ALuint source,ALenum pname,ALint *value); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetSourcei (JNIEnv *env, jclass clazz, jint source, jint pname) { ALint value = 0; alGetSourcei((ALuint) source, (ALenum) pname, &value); CHECK_AL_ERROR return value; } /** * This function retrieves a floating point property of a source. * * C Specification: * ALvoid alGetSourcef(ALuint source,ALenum pname,ALfloat *value); */ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_AL10_alGetSourcef (JNIEnv *env, jclass clazz, jint source, jint pname) { ALfloat value = 0.0f; alGetSourcef((ALuint) source, (ALenum) pname, &value); CHECK_AL_ERROR return value; } /** * This function retrieves a floating point-vector property of a source. * * C Specification: * ALvoid alGetSourcefv(ALuint source,ALenum pname,ALfloat *values); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGetSourcefv (JNIEnv *env, jclass clazz, jint source, jint pname, jobject values, jint offset) { alGetSourcefv((ALuint) source, (ALenum) pname, offset + (ALfloat*) env->GetDirectBufferAddress(values)); CHECK_AL_ERROR } /** * This function plays a set of sources. * * C Specification: * ALvoid alSourcePlayv(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourcePlayv (JNIEnv *env, jclass clazz, jint n, jobject sources, jint offset) { alSourcePlayv(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } /** * This function pauses a set of sources. * * C Specification: * ALvoid alSourcePausev(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourcePausev (JNIEnv *env, jclass clazz, jint n, jobject sources, jint offset) { alSourcePausev(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } /** * This function stops a set of sources. * * C Specification: * ALvoid alSourceStopv(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourceStopv (JNIEnv *env, jclass clazz, jint n, jobject sources, jint offset) { alSourceStopv(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } /** * This function stops a set of sources and sets all their states to AL_INITIAL. * * C Specification: * ALvoid alSourceRewindv(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourceRewindv (JNIEnv *env, jclass clazz, jint n, jobject sources, jint offset) { alSourceRewindv(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } /** * This function plays a source. * * C Specification: * ALvoid alSourcePlay(ALuint source); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourcePlay (JNIEnv *env, jclass clazz, jint source) { alSourcePlay((ALuint) source); CHECK_AL_ERROR } /* * This function pauses a source. * * C Specification: * ALvoid alSourcePause(ALuint source); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourcePause (JNIEnv *env, jclass clazz, jint source) { alSourcePause((ALuint) source); CHECK_AL_ERROR } /** * This function stops a source. * * C Specification: * ALvoid alSourceStop(ALuint source); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourceStop (JNIEnv *env, jclass clazz, jint source) { alSourceStop((ALuint) source); CHECK_AL_ERROR } /** * This function stops the source and sets its state to AL_INITIAL. * * C Specification: * ALvoid alSourceRewind(ALuint source); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourceRewind (JNIEnv *env, jclass clazz, jint source) { alSourceRewind((ALuint) source); CHECK_AL_ERROR } /** * This function generates one or more buffers. * * C Specification: * ALvoid alGenBuffers(ALsizei n,ALuint *buffers); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGenBuffers (JNIEnv *env, jclass clazz, jint n, jobject buffers, jint offset) { alGenBuffers(n, offset + (ALuint*) env->GetDirectBufferAddress(buffers)); CHECK_AL_ERROR } /** * This function deletes one or more buffers. * * C Specification: * ALvoid alDeleteBuffers(ALsizei n,ALuint *buffers); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalDeleteBuffers (JNIEnv *env, jclass clazz, jint n, jobject buffers, jint offset) { alDeleteBuffers(n, offset + (ALuint*) env->GetDirectBufferAddress(buffers)); CHECK_AL_ERROR } /** * This function tests if a buffer name is valid. * * C Specification: * Alboolean alIsBuffer(ALuint buffer); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_AL10_alIsBuffer (JNIEnv *env, jclass clazz, jint buffer) { jboolean result = (jboolean) alIsBuffer((ALuint) buffer); CHECK_AL_ERROR return result; } /** * This function fills a buffer with audio data. * * C Specification: * ALvoid alBufferData(ALuint buffer,ALenum format,ALvoid *data,ALsizei size,ALsizei freq); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalBufferData (JNIEnv *env, jclass clazz, jint buffer, jint format, jobject data, jint offset, jint size, jint freq) { alBufferData(buffer, format, (void*) (offset + (ALubyte *)env->GetDirectBufferAddress(data)), size, freq); CHECK_AL_ERROR } /** * This function retrieves an integer property of a buffer. * * C Specification: * ALvoid alGetBufferi(ALuint buffer,ALenum pname,ALint *value); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetBufferi (JNIEnv *env, jclass clazz, jint buffer, jint pname) { ALint value = 0; alGetBufferi((ALuint) buffer, (ALenum) pname, &value); CHECK_AL_ERROR return value; } /** * This function retrieves a floating point property of a buffer. * * C Specification: * ALvoid alGetBufferf(ALuint buffer,ALenum pname,ALfloat *value); */ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_AL10_alGetBufferf (JNIEnv *env, jclass clazz, jint buffer, jint pname) { ALfloat value = 0.0f; alGetBufferf((ALuint) buffer, (ALenum) pname, &value); CHECK_AL_ERROR return value; } /** * This function queues a set of buffers on a source. * * C Specification: * ALvoid alSourceQueueBuffers( ALuint source, ALsizei n, ALuint* buffers ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourceQueueBuffers (JNIEnv *env, jclass clazz, jint source, jint n, jobject buffers, jint offset) { alSourceQueueBuffers((ALuint) source, (ALsizei) n, offset + (ALuint*) env->GetDirectBufferAddress(buffers)); CHECK_AL_ERROR } /** * This function unqueues a set of buffers attached to a source. * * C Specification: * ALvoid alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint* buffers ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourceUnqueueBuffers (JNIEnv *env, jclass clazz, jint source, jint n, jobject buffers, jint offset) { alSourceUnqueueBuffers((ALuint) source, (ALsizei) n, offset + (ALuint*) env->GetDirectBufferAddress(buffers)); CHECK_AL_ERROR } /** * This function selects the OpenAL distance model. * * C Specification: * ALvoid alDistanceModel( ALenum value ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alDistanceModel (JNIEnv *env, jclass clazz, jint value) { alDistanceModel((ALenum) value); CHECK_AL_ERROR } /** * This function selects the OpenAL Doppler factor value. * * C Specification: * ALvoid alDopplerFactor( ALfloat value ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alDopplerFactor (JNIEnv *env, jclass clazz, jfloat value) { alDopplerFactor((ALfloat) value); CHECK_AL_ERROR } /** * This function selects the OpenAL Doppler velocity value. * * C Specification: * ALvoid alDopplerVelocity( ALfloat value ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alDopplerVelocity (JNIEnv *env, jclass clazz, jfloat value) { alDopplerVelocity((ALfloat) value); CHECK_AL_ERROR } --- NEW FILE: org_lwjgl_openal_AL10.h --- /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_openal_AL10 */ #ifndef _Included_org_lwjgl_openal_AL10 #define _Included_org_lwjgl_openal_AL10 #ifdef __cplusplus extern "C" { #endif /* Inaccessible static: _00024assertionsDisabled */ #undef org_lwjgl_openal_AL10_AL_INVALID #define org_lwjgl_openal_AL10_AL_INVALID -1L #undef org_lwjgl_openal_AL10_AL_NONE #define org_lwjgl_openal_AL10_AL_NONE 0L #undef org_lwjgl_openal_AL10_AL_FALSE #define org_lwjgl_openal_AL10_AL_FALSE 0L #undef org_lwjgl_openal_AL10_AL_TRUE #define org_lwjgl_openal_AL10_AL_TRUE 1L #undef org_lwjgl_openal_AL10_AL_SOURCE_TYPE #define org_lwjgl_openal_AL10_AL_SOURCE_TYPE 512L #undef org_lwjgl_openal_AL10_AL_SOURCE_ABSOLUTE #define org_lwjgl_openal_AL10_AL_SOURCE_ABSOLUTE 513L #undef org_lwjgl_openal_AL10_AL_SOURCE_RELATIVE #define org_lwjgl_openal_AL10_AL_SOURCE_RELATIVE 514L #undef org_lwjgl_openal_AL10_AL_CONE_INNER_ANGLE #define org_lwjgl_openal_AL10_AL_CONE_INNER_ANGLE 4097L #undef org_lwjgl_openal_AL10_AL_CONE_OUTER_ANGLE #define org_lwjgl_openal_AL10_AL_CONE_OUTER_ANGLE 4098L #undef org_lwjgl_openal_AL10_AL_PITCH #define org_lwjgl_openal_AL10_AL_PITCH 4099L #undef org_lwjgl_openal_AL10_AL_POSITION #define org_lwjgl_openal_AL10_AL_POSITION 4100L #undef org_lwjgl_openal_AL10_AL_DIRECTION #define org_lwjgl_openal_AL10_AL_DIRECTION 4101L #undef org_lwjgl_openal_AL10_AL_VELOCITY #define org_lwjgl_openal_AL10_AL_VELOCITY 4102L #undef org_lwjgl_openal_AL10_AL_LOOPING #define org_lwjgl_openal_AL10_AL_LOOPING 4103L #undef org_lwjgl_openal_AL10_AL_BUFFER #define org_lwjgl_openal_AL10_AL_BUFFER 4105L #undef org_lwjgl_openal_AL10_AL_GAIN #define org_lwjgl_openal_AL10_AL_GAIN 4106L #undef org_lwjgl_openal_AL10_AL_MIN_GAIN #define org_lwjgl_openal_AL10_AL_MIN_GAIN 4109L #undef org_lwjgl_openal_AL10_AL_MAX_GAIN #define org_lwjgl_openal_AL10_AL_MAX_GAIN 4110L #undef org_lwjgl_openal_AL10_AL_ORIENTATION #define org_lwjgl_openal_AL10_AL_ORIENTATION 4111L #undef org_lwjgl_openal_AL10_AL_REFERENCE_DISTANCE #define org_lwjgl_openal_AL10_AL_REFERENCE_DISTANCE 4128L #undef org_lwjgl_openal_AL10_AL_ROLLOFF_FACTOR #define org_lwjgl_openal_AL10_AL_ROLLOFF_FACTOR 4129L #undef org_lwjgl_openal_AL10_AL_CONE_OUTER_GAIN #define org_lwjgl_openal_AL10_AL_CONE_OUTER_GAIN 4130L #undef org_lwjgl_openal_AL10_AL_MAX_DISTANCE #define org_lwjgl_openal_AL10_AL_MAX_DISTANCE 4131L #undef org_lwjgl_openal_AL10_AL_CHANNEL_MASK #define org_lwjgl_openal_AL10_AL_CHANNEL_MASK 12288L #undef org_lwjgl_openal_AL10_AL_SOURCE_STATE #define org_lwjgl_openal_AL10_AL_SOURCE_STATE 4112L #undef org_lwjgl_openal_AL10_AL_INITIAL #define org_lwjgl_openal_AL10_AL_INITIAL 4113L #undef org_lwjgl_openal_AL10_AL_PLAYING #define org_lwjgl_openal_AL10_AL_PLAYING 4114L #undef org_lwjgl_openal_AL10_AL_PAUSED #define org_lwjgl_openal_AL10_AL_PAUSED 4115L #undef org_lwjgl_openal_AL10_AL_STOPPED #define org_lwjgl_openal_AL10_AL_STOPPED 4116L #undef org_lwjgl_openal_AL10_AL_BUFFERS_QUEUED #define org_lwjgl_openal_AL10_AL_BUFFERS_QUEUED 4117L #undef org_lwjgl_openal_AL10_AL_BUFFERS_PROCESSED #define org_lwjgl_openal_AL10_AL_BUFFERS_PROCESSED 4118L #undef org_lwjgl_openal_AL10_AL_FORMAT_MONO8 #define org_lwjgl_openal_AL10_AL_FORMAT_MONO8 4352L #undef org_lwjgl_openal_AL10_AL_FORMAT_MONO16 #define org_lwjgl_openal_AL10_AL_FORMAT_MONO16 4353L #undef org_lwjgl_openal_AL10_AL_FORMAT_STEREO8 #define org_lwjgl_openal_AL10_AL_FORMAT_STEREO8 4354L #undef org_lwjgl_openal_AL10_AL_FORMAT_STEREO16 #define org_lwjgl_openal_AL10_AL_FORMAT_STEREO16 4355L #undef org_lwjgl_openal_AL10_AL_FORMAT_VORBIS_EXT #define org_lwjgl_openal_AL10_AL_FORMAT_VORBIS_EXT 65539L #undef org_lwjgl_openal_AL10_AL_FREQUENCY #define org_lwjgl_openal_AL10_AL_FREQUENCY 8193L #undef org_lwjgl_openal_AL10_AL_BITS #define org_lwjgl_openal_AL10_AL_BITS 8194L #undef org_lwjgl_openal_AL10_AL_CHANNELS #define org_lwjgl_openal_AL10_AL_CHANNELS 8195L #undef org_lwjgl_openal_AL10_AL_SIZE #define org_lwjgl_openal_AL10_AL_SIZE 8196L #undef org_lwjgl_openal_AL10_AL_DATA #define org_lwjgl_openal_AL10_AL_DATA 8197L #undef org_lwjgl_openal_AL10_AL_UNUSED #define org_lwjgl_openal_AL10_AL_UNUSED 8208L #undef org_lwjgl_openal_AL10_AL_PENDING #define org_lwjgl_openal_AL10_AL_PENDING 8209L #undef org_lwjgl_openal_AL10_AL_PROCESSED #define org_lwjgl_openal_AL10_AL_PROCESSED 8210L #undef org_lwjgl_openal_AL10_AL_NO_ERROR #define org_lwjgl_openal_AL10_AL_NO_ERROR 0L #undef org_lwjgl_openal_AL10_AL_INVALID_NAME #define org_lwjgl_openal_AL10_AL_INVALID_NAME 40961L #undef org_lwjgl_openal_AL10_AL_INVALID_ENUM #define org_lwjgl_openal_AL10_AL_INVALID_ENUM 40962L #undef org_lwjgl_openal_AL10_AL_INVALID_VALUE #define org_lwjgl_openal_AL10_AL_INVALID_VALUE 40963L #undef org_lwjgl_openal_AL10_AL_INVALID_OPERATION #define org_lwjgl_openal_AL10_AL_INVALID_OPERATION 40964L #undef org_lwjgl_openal_AL10_AL_OUT_OF_MEMORY #define org_lwjgl_openal_AL10_AL_OUT_OF_MEMORY 40965L #undef org_lwjgl_openal_AL10_AL_VENDOR #define org_lwjgl_openal_AL10_AL_VENDOR 45057L #undef org_lwjgl_openal_AL10_AL_VERSION #define org_lwjgl_openal_AL10_AL_VERSION 45058L #undef org_lwjgl_openal_AL10_AL_RENDERER #define org_lwjgl_openal_AL10_AL_RENDERER 45059L #undef org_lwjgl_openal_AL10_AL_EXTENSIONS #define org_lwjgl_openal_AL10_AL_EXTENSIONS 45060L #undef org_lwjgl_openal_AL10_AL_DOPPLER_FACTOR #define org_lwjgl_openal_AL10_AL_DOPPLER_FACTOR 49152L #undef org_lwjgl_openal_AL10_AL_DOPPLER_VELOCITY #define org_lwjgl_openal_AL10_AL_DOPPLER_VELOCITY 49153L #undef org_lwjgl_openal_AL10_AL_DISTANCE_MODEL #define org_lwjgl_openal_AL10_AL_DISTANCE_MODEL 53248L #undef org_lwjgl_openal_AL10_AL_INVERSE_DISTANCE #define org_lwjgl_openal_AL10_AL_INVERSE_DISTANCE 53249L #undef org_lwjgl_openal_AL10_AL_INVERSE_DISTANCE_CLAMPED #define org_lwjgl_openal_AL10_AL_INVERSE_DISTANCE_CLAMPED 53250L /* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_openal_AL10 * Method: alEnable * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alEnable (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alDisable * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alDisable (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alIsEnabled * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_AL10_alIsEnabled (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alHint * Signature: (II)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alHint (JNIEnv *, jclass, jint, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alGetBoolean * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_AL10_alGetBoolean (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alGetInteger * Signature: (I)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetInteger (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alGetFloat * Signature: (I)F */ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_AL10_alGetFloat (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalGetBooleanv * Signature: (ILjava/nio/ByteBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGetBooleanv (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalGetIntegerv * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGetIntegerv (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalGetFloatv * Signature: (ILjava/nio/FloatBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGetFloatv (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alGetString * Signature: (I)Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_lwjgl_openal_AL10_alGetString (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alGetError * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetError (JNIEnv *, jclass); /* * Class: org_lwjgl_openal_AL10 * Method: alIsExtensionPresent * Signature: (Ljava/lang/String;)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_AL10_alIsExtensionPresent (JNIEnv *, jclass, jstring); /* * Class: org_lwjgl_openal_AL10 * Method: alGetEnumValue * Signature: (Ljava/lang/String;)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetEnumValue (JNIEnv *, jclass, jstring); /* * Class: org_lwjgl_openal_AL10 * Method: alListeneri * Signature: (II)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alListeneri (JNIEnv *, jclass, jint, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alListenerf * Signature: (IF)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alListenerf (JNIEnv *, jclass, jint, jfloat); /* * Class: org_lwjgl_openal_AL10 * Method: nalListenerfv * Signature: (ILjava/nio/FloatBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalListenerfv (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alListener3f * Signature: (IFFF)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alListener3f (JNIEnv *, jclass, jint, jfloat, jfloat, jfloat); /* * Class: org_lwjgl_openal_AL10 * Method: alGetListeneri * Signature: (I)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetListeneri (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alGetListenerf * Signature: (I)F */ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_AL10_alGetListenerf (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalGetListenerfv * Signature: (ILjava/nio/FloatBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGetListenerfv (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalGenSources * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGenSources (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalDeleteSources * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalDeleteSources (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alIsSource * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_AL10_alIsSource (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alSourcei * Signature: (III)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourcei (JNIEnv *, jclass, jint, jint, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alSourcef * Signature: (IIF)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourcef (JNIEnv *, jclass, jint, jint, jfloat); /* * Class: org_lwjgl_openal_AL10 * Method: nalSourcefv * Signature: (IILjava/nio/FloatBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourcefv (JNIEnv *, jclass, jint, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alSource3f * Signature: (IIFFF)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSource3f (JNIEnv *, jclass, jint, jint, jfloat, jfloat, jfloat); /* * Class: org_lwjgl_openal_AL10 * Method: alGetSourcei * Signature: (II)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetSourcei (JNIEnv *, jclass, jint, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alGetSourcef * Signature: (II)F */ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_AL10_alGetSourcef (JNIEnv *, jclass, jint, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalGetSourcefv * Signature: (IILjava/nio/FloatBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGetSourcefv (JNIEnv *, jclass, jint, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalSourcePlayv * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourcePlayv (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalSourcePausev * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourcePausev (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalSourceStopv * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourceStopv (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalSourceRewindv * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourceRewindv (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alSourcePlay * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourcePlay (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alSourcePause * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourcePause (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alSourceStop * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourceStop (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alSourceRewind * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alSourceRewind (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalGenBuffers * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalGenBuffers (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalDeleteBuffers * Signature: (ILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalDeleteBuffers (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alIsBuffer * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_AL10_alIsBuffer (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalBufferData * Signature: (IILjava/nio/ByteBuffer;III)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalBufferData (JNIEnv *, jclass, jint, jint, jobject, jint, jint, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alGetBufferi * Signature: (II)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_alGetBufferi (JNIEnv *, jclass, jint, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alGetBufferf * Signature: (II)F */ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_AL10_alGetBufferf (JNIEnv *, jclass, jint, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalSourceQueueBuffers * Signature: (IILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourceQueueBuffers (JNIEnv *, jclass, jint, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: nalSourceUnqueueBuffers * Signature: (IILjava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourceUnqueueBuffers (JNIEnv *, jclass, jint, jint, jobject, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alDistanceModel * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alDistanceModel (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_AL10 * Method: alDopplerFactor * Signature: (F)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alDopplerFactor (JNIEnv *, jclass, jfloat); /* * Class: org_lwjgl_openal_AL10 * Method: alDopplerVelocity * Signature: (F)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_alDopplerVelocity (JNIEnv *, jclass, jfloat); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_openal_eax_EAX.cpp --- /* * Copyright (c) 2002-2004 Lightweight 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 'Lightweight 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. */ #include "org_lwjgl_openal_eax_EAX.h" /* * Class: org_lwjgl_openal_eax_EAX * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_eax_EAX_nCreate (JNIEnv *env, jclass clazz) { #ifdef _WIN32 return true; #else return false; #endif } /* * Class: org_lwjgl_openal_eax_EAX * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_EAX_nDestroy (JNIEnv *env, jclass clazz) { } --- NEW FILE: org_lwjgl_openal_eax_EAX.h --- /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_openal_eax_EAX */ #ifndef _Included_org_lwjgl_openal_eax_EAX #define _Included_org_lwjgl_openal_eax_EAX #ifdef __cplusplus extern "C" { #endif /* Inaccessible static: created */ /* * Class: org_lwjgl_openal_eax_EAX * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_eax_EAX_nCreate (JNIEnv *, jclass); /* * Class: org_lwjgl_openal_eax_EAX * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_EAX_nDestroy (JNIEnv *, jclass); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_openal_eax_EAX20.cpp --- /* * Copyright (c) 2002-2004 Lightweight 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 'Lightweight 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_openal_eax_EAX20.cpp,v 1.1 2004/02/26 21:51:58 matzon Exp $ * * This is the actual JNI implementation of the OpenAL EAX library. * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ #include "org_lwjgl_openal_eax_EAX20.h" /* OpenAL includes */ #include "checkALerror.h" #include "common_tools.h" #include "extal.h" /* * Determines available EAX extensions */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_EAX20_determineAvailableExtensions (JNIEnv *env, jclass clazz) { #ifdef _WIN32 bool EAXSupported = false; //check that we have a current context if(alcGetCurrentContext() == NULL) { throwOpenALException(env, "Unable to determine EAX Extensions: No current context"); } //check for extension, and assign if available if(alIsExtensionPresent((ALubyte*) "EAX") == AL_TRUE) { eaxSet = (EAXSet)alGetProcAddress((ALubyte*) "EAXSet"); eaxGet = (EAXGet)alGetProcAddress((ALubyte*) "EAXGet"); EAXSupported = (eaxSet != NULL && eaxGet != NULL); } //throw exception if no EAX support if(EAXSupported != true) { throwOpenALException(env, "Unable to determine EAX Extensions"); } #else throwOpenALException(env, "EAX extensions not supported"); #endif } /* * This function retrieves an EAX value. * * C Specification: * ALenum EAXGet(const struct _GUID *propertySetID,ALuint property,ALuint source,ALvoid * *value,ALuint size); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_EAX20_neaxGet (JNIEnv *env, jclass clazz, jint propertySetID, jint property, jint source, jobject value, jint offset, jint size) { #ifdef _WIN32 jint result = 0; // determine buffer or listener if (propertySetID == org_lwjgl_openal_eax_EAX20_BUFFER_GUID) { result = (jint) eaxGet(&DSPROPSETID_EAX20_BufferProperties, (ALuint) property, (ALuint) source, (ALvoid*) (offset + (const char*) env->GetDirectBufferAddress(value)), (ALuint) size); } else if (propertySetID == org_lwjgl_openal_eax_EAX20_LISTENER_GUID) { result = (jint) eaxGet(&DSPROPSETID_EAX20_ListenerProperties, (ALuint) property, (ALuint) source, (ALvoid*) (offset + (const char*) env->GetDirectBufferAddress(value)), (ALuint) size); } CHECK_AL_ERROR return result; #else throwOpenALException(env, "EAX extensions not supported"); return 0; #endif } /* * This function sets an EAX value. * * C Specification: * ALenum EAXSet(const struct _GUID *propertySetID,ALuint property,ALuint source,ALvoid * *value,ALuint size); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_EAX20_neaxSet (JNIEnv *env, jclass clazz, jint propertySetID, jint property, jint source, jobject value, jint offset, jint size) { #ifdef _WIN32 jint result = 0; // determine buffer or listener if (propertySetID == org_lwjgl_openal_eax_EAX20_BUFFER_GUID) { result = (jint) eaxSet(&DSPROPSETID_EAX20_BufferProperties, (ALuint) (property), source, (ALvoid*) (offset + (const char*) env->GetDirectBufferAddress(value)), (ALuint) size); } else if (propertySetID == org_lwjgl_openal_eax_EAX20_LISTENER_GUID) { result = (jint) eaxSet(&DSPROPSETID_EAX20_ListenerProperties, (ALuint) (property), source, (ALvoid*) (offset + (const char*) env->GetDirectBufferAddress(value)), (ALuint) size); } CHECK_AL_ERROR return result; #else throwOpenALException(env, "EAX extensions not supported"); return 0; #endif } --- NEW FILE: org_lwjgl_openal_eax_EAX20.h --- /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_openal_eax_EAX20 */ #ifndef _Included_org_lwjgl_openal_eax_EAX20 #define _Included_org_lwjgl_openal_eax_EAX20 #ifdef __cplusplus extern "C" { #endif #undef org_lwjgl_openal_eax_EAX20_BUFFER_GUID #define org_lwjgl_openal_eax_EAX20_BUFFER_GUID 1L #undef org_lwjgl_openal_eax_EAX20_LISTENER_GUID #define org_lwjgl_openal_eax_EAX20_LISTENER_GUID 2L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_GENERIC #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_GENERIC 0L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_PADDEDCELL #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_PADDEDCELL 1L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_ROOM #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_ROOM 2L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_BATHROOM #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_BATHROOM 3L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_LIVINGROOM #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_LIVINGROOM 4L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_STONEROOM #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_STONEROOM 5L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_AUDITORIUM #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_AUDITORIUM 6L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_CONCERTHALL #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_CONCERTHALL 7L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_CAVE #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_CAVE 8L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_ARENA #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_ARENA 9L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_HANGAR #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_HANGAR 10L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_CARPETEDHALLWAY #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_CARPETEDHALLWAY 11L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_HALLWAY #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_HALLWAY 12L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_STONECORRIDOR #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_STONECORRIDOR 13L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_ALLEY #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_ALLEY 14L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_FOREST #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_FOREST 15L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_CITY #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_CITY 16L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_MOUNTAINS #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_MOUNTAINS 17L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_QUARRY #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_QUARRY 18L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_PLAIN #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_PLAIN 19L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_PARKINGLOT #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_PARKINGLOT 20L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_SEWERPIPE #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_SEWERPIPE 21L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_UNDERWATER #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_UNDERWATER 22L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_DRUGGED #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_DRUGGED 23L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_DIZZY #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_DIZZY 24L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_PSYCHOTIC #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_PSYCHOTIC 25L #undef org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_COUNT #define org_lwjgl_openal_eax_EAX20_EAX_ENVIRONMENT_COUNT 26L #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_SINGLEWINDOW #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_SINGLEWINDOW -2800L #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_SINGLEWINDOWLF #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_SINGLEWINDOWLF 0.71f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_SINGLEWINDOWROOMRATIO #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_SINGLEWINDOWROOMRATIO 0.43f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_DOUBLEWINDOW #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_DOUBLEWINDOW -5000L #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_DOUBLEWINDOWHF #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_DOUBLEWINDOWHF 0.4f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_DOUBLEWINDOWROOMRATIO #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_DOUBLEWINDOWROOMRATIO 0.24f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THINDOOR #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THINDOOR -1800L #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THINDOORLF #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THINDOORLF 0.66f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THINDOORROOMRATIO #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THINDOORROOMRATIO 0.66f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THICKDOOR #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THICKDOOR -4400L #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THICKDOORLF #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THICKDOORLF 0.64f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THICKDOORROOMRTATION #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_THICKDOORROOMRTATION 0.27f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_WOODWALL #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_WOODWALL -4000L #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_WOODWALLLF #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_WOODWALLLF 0.5f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_WOODWALLROOMRATIO #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_WOODWALLROOMRATIO 0.3f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_BRICKWALL #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_BRICKWALL -5000L #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_BRICKWALLLF #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_BRICKWALLLF 0.6f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_BRICKWALLROOMRATIO #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_BRICKWALLROOMRATIO 0.24f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_STONEWALL #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_STONEWALL -6000L #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_STONEWALLLF #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_STONEWALLLF 0.68f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_STONEWALLROOMRATIO #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_STONEWALLROOMRATIO 0.2f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_CURTAIN #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_CURTAIN -1200L #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_CURTAINLF #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_CURTAINLF 0.15f #undef org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_CURTAINROOMRATIO #define org_lwjgl_openal_eax_EAX20_EAX_MATERIAL_CURTAINROOMRATIO 1.0f /* * Class: org_lwjgl_openal_eax_EAX20 * Method: determineAvailableExtensions * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_EAX20_determineAvailableExtensions (JNIEnv *, jclass); /* * Class: org_lwjgl_openal_eax_EAX20 * Method: neaxGet * Signature: (IIILjava/nio/Buffer;II)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_EAX20_neaxGet (JNIEnv *, jclass, jint, jint, jint, jobject, jint, jint); /* * Class: org_lwjgl_openal_eax_EAX20 * Method: neaxSet * Signature: (IIILjava/nio/Buffer;II)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_EAX20_neaxSet (JNIEnv *, jclass, jint, jint, jint, jobject, jint, jint); #ifdef __cplusplus } #endif #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Makefile.am 25 Feb 2004 18:08:57 -0000 1.19 +++ Makefile.am 26 Feb 2004 21:51:58 -0000 1.20 @@ -22,14 +22,14 @@ org_lwjgl_input_Mouse.h \ org_lwjgl_openal_ALC.cpp \ org_lwjgl_openal_ALC.h \ - org_lwjgl_openal_BaseAL.cpp \ - org_lwjgl_openal_BaseAL.h \ - org_lwjgl_openal_CoreAL.cpp \ - org_lwjgl_openal_CoreAL.h \ - org_lwjgl_openal_eax_BaseEAX.cpp \ - org_lwjgl_openal_eax_BaseEAX.h \ - org_lwjgl_openal_eax_CoreEAX.cpp \ - org_lwjgl_openal_eax_CoreEAX.h \ + org_lwjgl_openal_AL.cpp \ + org_lwjgl_openal_AL.h \ + org_lwjgl_openal_AL10.cpp \ + org_lwjgl_openal_AL10.h \ + org_lwjgl_openal_eax_EAX.cpp \ + org_lwjgl_openal_eax_EAX.h \ + org_lwjgl_openal_eax_EAX20.cpp \ + org_lwjgl_openal_eax_EAX.h \ org_lwjgl_openal_eax_EAXBufferProperties.cpp \ org_lwjgl_openal_eax_EAXBufferProperties.h \ org_lwjgl_openal_eax_EAXListenerProperties.cpp \ --- org_lwjgl_openal_BaseAL.cpp DELETED --- --- org_lwjgl_openal_BaseAL.h DELETED --- --- org_lwjgl_openal_CoreAL.cpp DELETED --- --- org_lwjgl_openal_CoreAL.h DELETED --- --- org_lwjgl_openal_eax_BaseEAX.cpp DELETED --- --- org_lwjgl_openal_eax_BaseEAX.h DELETED --- --- org_lwjgl_openal_eax_CoreEAX.cpp DELETED --- --- org_lwjgl_openal_eax_CoreEAX.h DELETED --- |
From: <ma...@us...> - 2004-02-26 22:08:07
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6429/java/org/lwjgl/test/openal Modified Files: BasicTest.java EAXTest.java MovingSoundTest.java OpenALCreationTest.java PlayTest.java PlayTestMemory.java PositionTest.java SourceLimitTest.java StressTest.java WaveData.java Log Message: OpenAL / EAX Refactor Index: BasicTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/BasicTest.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- BasicTest.java 8 Feb 2004 20:32:09 -0000 1.13 +++ BasicTest.java 26 Feb 2004 21:51:57 -0000 1.14 @@ -37,6 +37,7 @@ import java.nio.IntBuffer; import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; /** * $Id$ @@ -115,7 +116,7 @@ * @param error Error code causing exit */ protected void exit(int error) { - System.out.println("OpenAL Error: " + AL.alGetString(error)); + System.out.println("OpenAL Error: " + AL10.alGetString(error)); alExit(); System.exit(-1); } Index: EAXTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/EAXTest.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- EAXTest.java 8 Feb 2004 20:32:09 -0000 1.11 +++ EAXTest.java 26 Feb 2004 21:51:58 -0000 1.12 @@ -38,7 +38,9 @@ import org.lwjgl.Sys; import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; import org.lwjgl.openal.eax.EAX; +import org.lwjgl.openal.eax.EAX20; import org.lwjgl.openal.eax.EAXBufferProperties; import org.lwjgl.openal.eax.EAXListenerProperties; @@ -94,9 +96,9 @@ runTest(); // kill sources and buffers - AL.alSourceStop(soundSources.get(0)); - AL.alDeleteSources(soundSources); - AL.alDeleteBuffers(soundBuffers); + AL10.alSourceStop(soundSources.get(0)); + AL10.alDeleteSources(soundSources); + AL10.alDeleteBuffers(soundBuffers); EAX.destroy(); } @@ -108,22 +110,22 @@ private boolean initialize() { // creating buffers Sys.log("Creating buffers"); - AL.alGenBuffers(soundBuffers); + AL10.alGenBuffers(soundBuffers); soundBuffers.rewind(); // creating sources Sys.log("Creating sources"); - AL.alGenSources(soundSources); + AL10.alGenSources(soundSources); soundSources.rewind(); // load sound files (left, center, right).wav Sys.log("Loading Footsteps.wav"); WaveData footsteps = WaveData.create("Footsteps.wav"); - AL.alBufferData(soundBuffers.get(0), footsteps.format, footsteps.data, footsteps.data.capacity(), footsteps.samplerate); - AL.alSourcef(soundSources.get(0), AL.AL_PITCH, 1.0f); - AL.alSourcef(soundSources.get(0), AL.AL_GAIN, 1.0f); - AL.alSourcei(soundSources.get(0), AL.AL_BUFFER, soundBuffers.get(0)); - AL.alSourcei(soundSources.get(0), AL.AL_LOOPING, AL.AL_TRUE); + AL10.alBufferData(soundBuffers.get(0), footsteps.format, footsteps.data, footsteps.data.capacity(), footsteps.samplerate); + AL10.alSourcef(soundSources.get(0), AL10.AL_PITCH, 1.0f); + AL10.alSourcef(soundSources.get(0), AL10.AL_GAIN, 1.0f); + AL10.alSourcei(soundSources.get(0), AL10.AL_BUFFER, soundBuffers.get(0)); + AL10.alSourcei(soundSources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); // create eax property objects listenerProperties = new EAXListenerProperties(); @@ -132,7 +134,7 @@ // set buffer to work on source 0 bufferProperties.setCurrentSource(soundSources.get(0)); - return AL.alGetError() == AL.AL_NO_ERROR; + return AL10.alGetError() == AL10.AL_NO_ERROR; } /** @@ -142,7 +144,7 @@ boolean running = true; char key; - assert AL.alIsBuffer(soundBuffers.get(0)) : "Failed to validate buffer"; + assert AL10.alIsBuffer(soundBuffers.get(0)) : "Failed to validate buffer"; // handle menu do { @@ -152,25 +154,25 @@ switch (key) { // play sound case '1' : { - AL.alSourcePlay(soundSources.get(0)); + AL10.alSourcePlay(soundSources.get(0)); break; } // stop sound case '2' : { - AL.alSourceStop(soundSources.get(0)); + AL10.alSourceStop(soundSources.get(0)); break; } // add reverb case '3' : { - listenerProperties.setEnvironment(EAX.EAX_ENVIRONMENT_HANGAR); + listenerProperties.setEnvironment(EAX20.EAX_ENVIRONMENT_HANGAR); break; } // remove reverb case '4' : { - listenerProperties.setEnvironment(EAX.EAX_ENVIRONMENT_GENERIC); + listenerProperties.setEnvironment(EAX20.EAX_ENVIRONMENT_GENERIC); break; } Index: MovingSoundTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/MovingSoundTest.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- MovingSoundTest.java 15 Feb 2004 15:34:56 -0000 1.26 +++ MovingSoundTest.java 26 Feb 2004 21:51:58 -0000 1.27 @@ -34,8 +34,9 @@ import java.nio.IntBuffer; import org.lwjgl.input.Keyboard; -import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; import org.lwjgl.openal.eax.EAX; +import org.lwjgl.openal.eax.EAX20; import org.lwjgl.openal.eax.EAXListenerProperties; import org.lwjgl.opengl.Window; import org.lwjgl.vector.Vector3f; @@ -96,14 +97,14 @@ // al generate buffers and sources buffers.position(0).limit(1); - AL.alGenBuffers(buffers); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alGenBuffers(buffers); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } sources.position(0).limit(1); - AL.alGenSources(sources); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alGenSources(sources); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } @@ -111,13 +112,13 @@ WaveData wavefile = WaveData.create(args[0]); //copy to buffers - AL.alBufferData( + AL10.alBufferData( buffers.get(0), wavefile.format, wavefile.data, wavefile.data.capacity(), wavefile.samplerate); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } @@ -125,28 +126,28 @@ wavefile.dispose(); //set up source input - AL.alSourcei(sources.get(0), AL.AL_BUFFER, buffers.get(0)); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } - AL.alSourcef(sources.get(0), AL.AL_REFERENCE_DISTANCE, 1024.0f); - AL.alSourcef(sources.get(0), AL.AL_ROLLOFF_FACTOR, 0.5f); + AL10.alSourcef(sources.get(0), AL10.AL_REFERENCE_DISTANCE, 1024.0f); + AL10.alSourcef(sources.get(0), AL10.AL_ROLLOFF_FACTOR, 0.5f); //lets loop the sound - AL.alSourcei(sources.get(0), AL.AL_LOOPING, AL.AL_TRUE); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //play source 0 - AL.alSourcePlay(sources.get(0)); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcePlay(sources.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //setup EAX if possible - if (AL.alIsExtensionPresent("EAX")) { + if (AL10.alIsExtensionPresent("EAX")) { try { EAX.create(); eaxListenerProp = new EAXListenerProperties(); @@ -163,31 +164,31 @@ if(Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { if(Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { listenerPosition.x -= MOVEMENT; - AL.alListener3f(AL.AL_POSITION, listenerPosition.x, listenerPosition.y, listenerPosition.z); + AL10.alListener3f(AL10.AL_POSITION, listenerPosition.x, listenerPosition.y, listenerPosition.z); System.out.println("listenerx: " + listenerPosition.x); } else { sourcePosition.x -= MOVEMENT; - AL.alSource3f(sources.get(0), AL.AL_POSITION, sourcePosition.x, sourcePosition.y, sourcePosition.z); + AL10.alSource3f(sources.get(0), AL10.AL_POSITION, sourcePosition.x, sourcePosition.y, sourcePosition.z); System.out.println("sourcex: " + sourcePosition.x); } } if(Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { if(Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { listenerPosition.x += MOVEMENT; - AL.alListener3f(AL.AL_POSITION, listenerPosition.x, listenerPosition.y, listenerPosition.z); + AL10.alListener3f(AL10.AL_POSITION, listenerPosition.x, listenerPosition.y, listenerPosition.z); System.out.println("listenerx: " + listenerPosition.x); } else { sourcePosition.x += MOVEMENT; - AL.alSource3f(sources.get(0), AL.AL_POSITION, sourcePosition.x, sourcePosition.y, sourcePosition.z); + AL10.alSource3f(sources.get(0), AL10.AL_POSITION, sourcePosition.x, sourcePosition.y, sourcePosition.z); System.out.println("sourcex: " + sourcePosition.x); } } if(Keyboard.isKeyDown(Keyboard.KEY_E)) { if(eaxApplied) { - eaxListenerProp.setEnvironment(EAX.EAX_ENVIRONMENT_GENERIC); + eaxListenerProp.setEnvironment(EAX20.EAX_ENVIRONMENT_GENERIC); } else { - eaxListenerProp.setEnvironment(EAX.EAX_ENVIRONMENT_HANGAR); + eaxListenerProp.setEnvironment(EAX20.EAX_ENVIRONMENT_HANGAR); } eaxApplied = !eaxApplied; } @@ -203,21 +204,21 @@ } //stop source 0 - AL.alSourceStop(sources.get(0)); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourceStop(sources.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //delete buffers and sources sources.position(0).limit(1); - AL.alDeleteSources(sources); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alDeleteSources(sources); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } buffers.position(0).limit(1); - AL.alDeleteBuffers(buffers); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alDeleteBuffers(buffers); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } Index: OpenALCreationTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/OpenALCreationTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- OpenALCreationTest.java 8 Feb 2004 20:32:09 -0000 1.8 +++ OpenALCreationTest.java 26 Feb 2004 21:51:58 -0000 1.9 @@ -36,6 +36,7 @@ import java.nio.IntBuffer; import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; /** * $Id$ @@ -87,7 +88,7 @@ * @param error Error code causing exit */ protected void exit(int error) { - System.out.println("OpenAL Error: " + AL.alGetString(error)); + System.out.println("OpenAL Error: " + AL10.alGetString(error)); alExit(); System.exit(-1); } @@ -137,14 +138,14 @@ // al generate buffers and sources buffers.position(0).limit(1); - AL.alGenBuffers(buffers); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alGenBuffers(buffers); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } sources.position(0).limit(1); - AL.alGenSources(sources); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alGenSources(sources); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } @@ -152,13 +153,13 @@ WaveData wavefile = WaveData.create("Footsteps.wav"); //copy to buffers - AL.alBufferData( + AL10.alBufferData( buffers.get(0), wavefile.format, wavefile.data, wavefile.data.capacity(), wavefile.samplerate); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } @@ -166,20 +167,20 @@ wavefile.dispose(); //set up source input - AL.alSourcei(sources.get(0), AL.AL_BUFFER, buffers.get(0)); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //lets loop the sound - AL.alSourcei(sources.get(0), AL.AL_LOOPING, AL.AL_TRUE); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //play source 0 - AL.alSourcePlay(sources.get(0)); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcePlay(sources.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } @@ -192,21 +193,21 @@ System.out.println("done"); //stop source 0 - AL.alSourceStop(sources.get(0)); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourceStop(sources.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //delete buffers and sources sources.position(0).limit(1); - AL.alDeleteSources(sources); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alDeleteSources(sources); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } buffers.position(0).limit(1); - AL.alDeleteBuffers(buffers); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alDeleteBuffers(buffers); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } } Index: PlayTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTest.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- PlayTest.java 8 Feb 2004 20:32:10 -0000 1.13 +++ PlayTest.java 26 Feb 2004 21:51:58 -0000 1.14 @@ -37,7 +37,7 @@ import java.nio.ByteOrder; import java.nio.IntBuffer; -import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; /** * $Id$ @@ -70,7 +70,7 @@ if(args[0].endsWith(".ogg")) { System.out.print("Attempting to load Ogg Vorbis file, checking for extension..."); - if(AL.alIsExtensionPresent("AL_EXT_vorbis")) { + if(AL10.alIsExtensionPresent("AL_EXT_vorbis")) { System.out.println("found"); usingVorbis = true; } else { @@ -88,14 +88,14 @@ // al generate buffers and sources buffers.position(0).limit(1); - AL.alGenBuffers(buffers); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alGenBuffers(buffers); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } sources.position(0).limit(1); - AL.alGenSources(sources); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alGenSources(sources); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } @@ -103,38 +103,38 @@ ByteBuffer filebuffer = getData(args[0]); // pass directly to buffer data - AL.alBufferData(buffers.get(0), AL.AL_FORMAT_VORBIS_EXT, filebuffer, -1, -1); + AL10.alBufferData(buffers.get(0), AL10.AL_FORMAT_VORBIS_EXT, filebuffer, -1, -1); filebuffer.clear(); } else { // load wave data from buffer WaveData wavefile = WaveData.create(args[0]); //copy to buffers - AL.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.data.capacity(), wavefile.samplerate); + AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.data.capacity(), wavefile.samplerate); //unload file again wavefile.dispose(); } - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //set up source input - AL.alSourcei(sources.get(0), AL.AL_BUFFER, buffers.get(0)); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //lets loop the sound - AL.alSourcei(sources.get(0), AL.AL_LOOPING, AL.AL_TRUE); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //play source 0 - AL.alSourcePlay(sources.get(0)); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcePlay(sources.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } @@ -146,21 +146,21 @@ } //stop source 0 - AL.alSourceStop(sources.get(0)); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourceStop(sources.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //delete buffers and sources sources.position(0).limit(1); - AL.alDeleteSources(sources); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alDeleteSources(sources); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } buffers.position(0).limit(1); - AL.alDeleteBuffers(buffers); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alDeleteBuffers(buffers); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } Index: PlayTestMemory.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTestMemory.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- PlayTestMemory.java 8 Feb 2004 20:32:10 -0000 1.14 +++ PlayTestMemory.java 26 Feb 2004 21:51:58 -0000 1.15 @@ -37,7 +37,7 @@ import java.nio.ByteOrder; import java.nio.IntBuffer; -import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; /** * $Id$ @@ -70,7 +70,7 @@ if(args[0].endsWith(".ogg")) { System.out.print("Attempting to load Ogg Vorbis file, checking for extension..."); - if(AL.alIsExtensionPresent("AL_EXT_vorbis")) { + if(AL10.alIsExtensionPresent("AL_EXT_vorbis")) { System.out.println("found"); usingVorbis = true; } else { @@ -88,14 +88,14 @@ // al generate buffers and sources buffers.position(0).limit(1); - AL.alGenBuffers(buffers); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alGenBuffers(buffers); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } sources.position(0).limit(1); - AL.alGenSources(sources); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alGenSources(sources); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } @@ -111,40 +111,40 @@ //ALUTLoadWAVData file = alut.loadWAVMemory(Sys.getDirectBufferAddress(filebuffer)); if(usingVorbis) { // pass directly to buffer data - AL.alBufferData(buffers.get(0), AL.AL_FORMAT_VORBIS_EXT, filebuffer, -1, -1); + AL10.alBufferData(buffers.get(0), AL10.AL_FORMAT_VORBIS_EXT, filebuffer, -1, -1); filebuffer.clear(); } else { // load wave data from buffer WaveData wavefile = WaveData.create(filebuffer.array()); //copy to buffers - AL.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.data.capacity(), wavefile.samplerate); + AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.data.capacity(), wavefile.samplerate); //unload file again wavefile.dispose(); } // check for errors - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //set up source input - AL.alSourcei(sources.get(0), AL.AL_BUFFER, buffers.get(0)); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //lets loop the sound - AL.alSourcei(sources.get(0), AL.AL_LOOPING, AL.AL_TRUE); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //play source 0 - AL.alSourcePlay(sources.get(0)); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourcePlay(sources.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } @@ -156,21 +156,21 @@ } //stop source 0 - AL.alSourceStop(sources.get(0)); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alSourceStop(sources.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } //delete buffers and sources sources.position(0).limit(1); - AL.alDeleteSources(sources); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alDeleteSources(sources); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } buffers.position(0).limit(1); - AL.alDeleteBuffers(buffers); - if((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alDeleteBuffers(buffers); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { exit(lastError); } Index: PositionTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PositionTest.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- PositionTest.java 15 Feb 2004 15:34:56 -0000 1.12 +++ PositionTest.java 26 Feb 2004 21:51:58 -0000 1.13 @@ -8,6 +8,7 @@ import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.Window; import org.lwjgl.opengl.glu.GLU; @@ -158,17 +159,17 @@ rightPosition.flip(); rightVelocity.flip(); - AL.alListener(AL.AL_POSITION, listenerPosition); - AL.alListener(AL.AL_VELOCITY, listenerVelocity); - AL.alListener(AL.AL_ORIENTATION, listenerOrientation); + AL10.alListener(AL10.AL_POSITION, listenerPosition); + AL10.alListener(AL10.AL_VELOCITY, listenerVelocity); + AL10.alListener(AL10.AL_ORIENTATION, listenerOrientation); // creating buffers Sys.log("Creating buffers"); - AL.alGenBuffers(soundBuffers); + AL10.alGenBuffers(soundBuffers); soundBuffers.rewind(); // creating sources - AL.alGenSources(soundSources); + AL10.alGenSources(soundSources); soundSources.rewind(); // load sound files (left, center, right).wav @@ -176,33 +177,33 @@ Sys.log("Loading left.wav"); WaveData left = WaveData.create("left.wav"); - AL.alBufferData(soundBuffers.get(LEFT), left.format, left.data, left.data.capacity(), left.samplerate); - AL.alSourcef(soundSources.get(LEFT), AL.AL_PITCH, 1.0f); - AL.alSourcef(soundSources.get(LEFT), AL.AL_GAIN, 1.0f); - AL.alSource(soundSources.get(LEFT), AL.AL_POSITION, leftPosition); - AL.alSource(soundSources.get(LEFT), AL.AL_VELOCITY, leftVelocity); - AL.alSourcei(soundSources.get(LEFT), AL.AL_BUFFER, soundBuffers.get(LEFT)); - AL.alSourcei(soundSources.get(LEFT), AL.AL_LOOPING, AL.AL_TRUE); + AL10.alBufferData(soundBuffers.get(LEFT), left.format, left.data, left.data.capacity(), left.samplerate); + AL10.alSourcef(soundSources.get(LEFT), AL10.AL_PITCH, 1.0f); + AL10.alSourcef(soundSources.get(LEFT), AL10.AL_GAIN, 1.0f); + AL10.alSource(soundSources.get(LEFT), AL10.AL_POSITION, leftPosition); + AL10.alSource(soundSources.get(LEFT), AL10.AL_VELOCITY, leftVelocity); + AL10.alSourcei(soundSources.get(LEFT), AL10.AL_BUFFER, soundBuffers.get(LEFT)); + AL10.alSourcei(soundSources.get(LEFT), AL10.AL_LOOPING, AL10.AL_TRUE); Sys.log("Loading center.wav"); WaveData center = WaveData.create("center.wav"); - AL.alBufferData(soundBuffers.get(CENTER), center.format, center.data, center.data.capacity(), center.samplerate); - AL.alSourcef(soundSources.get(CENTER), AL.AL_PITCH, 1.0f); - AL.alSourcef(soundSources.get(CENTER), AL.AL_GAIN, 1.0f); - AL.alSource(soundSources.get(CENTER), AL.AL_POSITION, centerPosition); - AL.alSource(soundSources.get(CENTER), AL.AL_VELOCITY, centerVelocity); - AL.alSourcei(soundSources.get(CENTER), AL.AL_BUFFER, soundBuffers.get(CENTER)); - AL.alSourcei(soundSources.get(CENTER), AL.AL_LOOPING, AL.AL_TRUE); + AL10.alBufferData(soundBuffers.get(CENTER), center.format, center.data, center.data.capacity(), center.samplerate); + AL10.alSourcef(soundSources.get(CENTER), AL10.AL_PITCH, 1.0f); + AL10.alSourcef(soundSources.get(CENTER), AL10.AL_GAIN, 1.0f); + AL10.alSource(soundSources.get(CENTER), AL10.AL_POSITION, centerPosition); + AL10.alSource(soundSources.get(CENTER), AL10.AL_VELOCITY, centerVelocity); + AL10.alSourcei(soundSources.get(CENTER), AL10.AL_BUFFER, soundBuffers.get(CENTER)); + AL10.alSourcei(soundSources.get(CENTER), AL10.AL_LOOPING, AL10.AL_TRUE); Sys.log("Loading right.wav"); WaveData right = WaveData.create("right.wav"); - AL.alBufferData(soundBuffers.get(RIGHT), right.format, right.data, right.data.capacity(), right.samplerate); - AL.alSourcef(soundSources.get(RIGHT), AL.AL_PITCH, 1.0f); - AL.alSourcef(soundSources.get(RIGHT), AL.AL_GAIN, 1.0f); - AL.alSource(soundSources.get(RIGHT), AL.AL_POSITION, rightPosition); - AL.alSource(soundSources.get(RIGHT), AL.AL_VELOCITY, rightVelocity); - AL.alSourcei(soundSources.get(RIGHT), AL.AL_BUFFER, soundBuffers.get(RIGHT)); - AL.alSourcei(soundSources.get(RIGHT), AL.AL_LOOPING, AL.AL_TRUE); + AL10.alBufferData(soundBuffers.get(RIGHT), right.format, right.data, right.data.capacity(), right.samplerate); + AL10.alSourcef(soundSources.get(RIGHT), AL10.AL_PITCH, 1.0f); + AL10.alSourcef(soundSources.get(RIGHT), AL10.AL_GAIN, 1.0f); + AL10.alSource(soundSources.get(RIGHT), AL10.AL_POSITION, rightPosition); + AL10.alSource(soundSources.get(RIGHT), AL10.AL_VELOCITY, rightVelocity); + AL10.alSourcei(soundSources.get(RIGHT), AL10.AL_BUFFER, soundBuffers.get(RIGHT)); + AL10.alSourcei(soundSources.get(RIGHT), AL10.AL_LOOPING, AL10.AL_TRUE); Sys.log("Soundfiles loaded successfully"); // ----------------------------------------------------- @@ -281,11 +282,11 @@ * Starts playing the sounds at different times */ private void startSounds() { - AL.alSourcePlay(soundSources.get(LEFT)); + AL10.alSourcePlay(soundSources.get(LEFT)); pause(300); - AL.alSourcePlay(soundSources.get(CENTER)); + AL10.alSourcePlay(soundSources.get(CENTER)); pause(500); - AL.alSourcePlay(soundSources.get(RIGHT)); + AL10.alSourcePlay(soundSources.get(RIGHT)); } /** @@ -297,7 +298,7 @@ // if requesting pause, and not paused - pause and stop sound if(paused && !pauseMode) { pauseMode = true; - AL.alSourcePause(soundSources); + AL10.alSourcePause(soundSources); } // else go out of pause mode and start sounds @@ -325,17 +326,17 @@ // Test for play // ============================================ if (Keyboard.isKeyDown(Keyboard.KEY_1)) { - AL.alSourcePlay(soundSources.get(LEFT)); + AL10.alSourcePlay(soundSources.get(LEFT)); Sys.log("Playing left.wav"); } if (Keyboard.isKeyDown(Keyboard.KEY_2)) { - AL.alSourcePlay(soundSources.get(CENTER)); + AL10.alSourcePlay(soundSources.get(CENTER)); Sys.log("Playing center.wav"); } if (Keyboard.isKeyDown(Keyboard.KEY_3)) { - AL.alSourcePlay(soundSources.get(RIGHT)); + AL10.alSourcePlay(soundSources.get(RIGHT)); Sys.log("Playing right.wav"); } // -------------------------------------------- @@ -343,17 +344,17 @@ // Test for stop // ============================================ if (Keyboard.isKeyDown(Keyboard.KEY_4)) { - AL.alSourceStop(soundSources.get(LEFT)); + AL10.alSourceStop(soundSources.get(LEFT)); Sys.log("Stopped left.wav"); } if (Keyboard.isKeyDown(Keyboard.KEY_5)) { - AL.alSourceStop(soundSources.get(CENTER)); + AL10.alSourceStop(soundSources.get(CENTER)); Sys.log("Stopped center.wav"); } if (Keyboard.isKeyDown(Keyboard.KEY_6)) { - AL.alSourceStop(soundSources.get(RIGHT)); + AL10.alSourceStop(soundSources.get(RIGHT)); Sys.log("Stopped right.wav"); } // -------------------------------------------- @@ -362,12 +363,12 @@ // ============================================ if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { listenerPosition.put(0, listenerPosition.get(0) - 0.1f); - AL.alListener(AL.AL_POSITION, listenerPosition); + AL10.alListener(AL10.AL_POSITION, listenerPosition); } if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { listenerPosition.put(0, listenerPosition.get(0) + 0.1f); - AL.alListener(AL.AL_POSITION, listenerPosition); + AL10.alListener(AL10.AL_POSITION, listenerPosition); } if (Keyboard.isKeyDown(Keyboard.KEY_UP)) { @@ -376,7 +377,7 @@ } else { listenerPosition.put(2, listenerPosition.get(2) - 0.1f); } - AL.alListener(AL.AL_POSITION, listenerPosition); + AL10.alListener(AL10.AL_POSITION, listenerPosition); } if (Keyboard.isKeyDown(Keyboard.KEY_DOWN)) { @@ -385,7 +386,7 @@ } else { listenerPosition.put(2, listenerPosition.get(2) + 0.1f); } - AL.alListener(AL.AL_POSITION, listenerPosition); + AL10.alListener(AL10.AL_POSITION, listenerPosition); } // -------------------------------------------- @@ -400,7 +401,7 @@ listenerPosition.put(2, listenerPosition.get(2) + 0.1f); } - AL.alListener(AL.AL_POSITION, listenerPosition); + AL10.alListener(AL10.AL_POSITION, listenerPosition); } @@ -463,9 +464,9 @@ Mouse.destroy(); Sys.log("Shutting down OpenAL"); - AL.alSourceStop(soundSources); - AL.alDeleteSources(soundSources); - AL.alDeleteBuffers(soundBuffers); + AL10.alSourceStop(soundSources); + AL10.alDeleteSources(soundSources); + AL10.alDeleteBuffers(soundBuffers); AL.destroy(); Sys.log("Shutting down Window"); Index: SourceLimitTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/SourceLimitTest.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- SourceLimitTest.java 8 Feb 2004 20:32:09 -0000 1.10 +++ SourceLimitTest.java 26 Feb 2004 21:51:58 -0000 1.11 @@ -33,7 +33,7 @@ import java.nio.IntBuffer; -import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; import org.lwjgl.openal.OpenALException; /** @@ -97,15 +97,15 @@ //Create sourcesToCreate sources in one fell swoop sources.position(0).limit(sourcesToCreate); - AL.alGenSources(sources); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { - System.out.println("failed to create " + sourcesToCreate + " sources (" + AL.alGetString(lastError) + ")"); + AL10.alGenSources(sources); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + System.out.println("failed to create " + sourcesToCreate + " sources (" + AL10.alGetString(lastError) + ")"); return; } //delete sources sources.position(0).limit(sourcesToCreate); - AL.alDeleteSources(sources); + AL10.alDeleteSources(sources); System.out.println("created " + sourcesToCreate + " sources successfully!"); } @@ -124,8 +124,8 @@ for (int i = 0; i <= sourcesToCreate; i++) { sources[i] = createIntBuffer(1); sources[i].position(0).limit(1); - AL.alGenSources(sources[i]); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { + AL10.alGenSources(sources[i]); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { System.out.println("failed to create source: " + (i + 1)); break; } @@ -136,9 +136,9 @@ for (int i = 0; i < sourcesCreated; i++) { //delete buffers and sources sources[i].position(0).limit(1); - AL.alDeleteSources(sources[i]); - if ((lastError = AL.alGetError()) != AL.AL_NO_ERROR) { - System.out.println("failed to delete source: " + i + "(" + AL.alGetString(lastError) + ")"); + AL10.alDeleteSources(sources[i]); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + System.out.println("failed to delete source: " + i + "(" + AL10.alGetString(lastError) + ")"); break; } } Index: StressTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/StressTest.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- StressTest.java 8 Feb 2004 20:32:09 -0000 1.10 +++ StressTest.java 26 Feb 2004 21:51:58 -0000 1.11 @@ -33,7 +33,7 @@ import java.nio.IntBuffer; -import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; /** * $Id$ @@ -81,8 +81,8 @@ private void createSources() { sources = createIntBuffer(4); sources.position(0).limit(4); - AL.alGenSources(sources); - if (AL.alGetError() != AL.AL_NO_ERROR) { + AL10.alGenSources(sources); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { System.out.println("Unable to create 4 sources"); alExit(); } @@ -91,32 +91,32 @@ private void createBuffers() { buffers = createIntBuffer(10); buffers.position(0).limit(10); - AL.alGenBuffers(buffers); - if (AL.alGetError() != AL.AL_NO_ERROR) { + AL10.alGenBuffers(buffers); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { System.out.println("Unable to create 10 buffers"); sources.position(0).limit(4); - AL.alDeleteSources(sources); + AL10.alDeleteSources(sources); alExit(); } } private void loadSamples() throws Exception { - AL.alGetError(); + AL10.alGetError(); WaveData data = WaveData.create("ding.wav"); for (int i = 1; i <= 10; i++) { - AL.alBufferData( + AL10.alBufferData( buffers.get(i - 1), data.format, data.data, data.data.capacity(), data.samplerate); - if (AL.alGetError() != AL.AL_NO_ERROR) { + if (AL10.alGetError() != AL10.AL_NO_ERROR) { System.out.println("Failed to load " + i + ".wav into buffer"); sources.position(0).limit(4); - AL.alDeleteSources(sources); + AL10.alDeleteSources(sources); buffers.position(0).limit(10); - AL.alDeleteBuffers(buffers); + AL10.alDeleteBuffers(buffers); alExit(); } @@ -132,11 +132,11 @@ long startTime = System.currentTimeMillis(); //mark background source as looping - AL.alSourcei(sources.get(0), AL.AL_LOOPING, AL.AL_TRUE); + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); //play background - AL.alSourcei(sources.get(0), AL.AL_BUFFER, buffers.get(0)); - AL.alSourcePlay(sources.get(0)); + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + AL10.alSourcePlay(sources.get(0)); while (System.currentTimeMillis() - startTime < (2000)) { @@ -144,22 +144,22 @@ System.out.println("random:" + randomBuffer); //stop source at slot - AL.alSourceStop(sources.get(nextSlot)); - if (AL.alGetError() != AL.AL_NO_ERROR) { + AL10.alSourceStop(sources.get(nextSlot)); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { System.out.println("Error stopping source."); } System.out.println("Stopped source: " + nextSlot); //link source<->buffer - AL.alSourcei(sources.get(nextSlot), AL.AL_BUFFER, buffers.get(randomBuffer)); - if (AL.alGetError() != AL.AL_NO_ERROR) { + AL10.alSourcei(sources.get(nextSlot), AL10.AL_BUFFER, buffers.get(randomBuffer)); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { System.out.println("Error linking buffer and source."); } System.out.println("linked source " + nextSlot + " with buffer " + randomBuffer); //start playing System.out.println("playing source " + nextSlot); - AL.alSourcePlay(sources.get(nextSlot++)); + AL10.alSourcePlay(sources.get(nextSlot++)); if (nextSlot == 4) { nextSlot = startSlot; } @@ -182,7 +182,7 @@ //stop all sources for (int i = 0; i < 4; i++) { - AL.alSourceStop(sources.get(i)); + AL10.alSourceStop(sources.get(i)); System.out.println("Stopping source " + (i+1)); } @@ -200,9 +200,9 @@ } sources.position(0).limit(4); - AL.alDeleteSources(sources); + AL10.alDeleteSources(sources); buffers.position(0).limit(10); - AL.alDeleteBuffers(buffers); + AL10.alDeleteBuffers(buffers); } private int getRandomBuffer() { Index: WaveData.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/WaveData.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- WaveData.java 8 Feb 2004 20:32:09 -0000 1.14 +++ WaveData.java 26 Feb 2004 21:51:58 -0000 1.15 @@ -42,7 +42,7 @@ import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; -import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; /** * $Id$ @@ -131,17 +131,17 @@ int channels = 0; if (audioformat.getChannels() == 1) { if (audioformat.getSampleSizeInBits() == 8) { - channels = AL.AL_FORMAT_MONO8; + channels = AL10.AL_FORMAT_MONO8; } else if (audioformat.getSampleSizeInBits() == 16) { - channels = AL.AL_FORMAT_MONO16; + channels = AL10.AL_FORMAT_MONO16; } else { assert false : "Illegal sample size"; } } else if (audioformat.getChannels() == 2) { if (audioformat.getSampleSizeInBits() == 8) { - channels = AL.AL_FORMAT_STEREO8; + channels = AL10.AL_FORMAT_STEREO8; } else if (audioformat.getSampleSizeInBits() == 16) { - channels = AL.AL_FORMAT_STEREO16; + channels = AL10.AL_FORMAT_STEREO16; } else { assert false : "Illegal sample size"; } |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6429/java/org/lwjgl/openal/eax Modified Files: EAX.java EAXBufferProperties.java EAXListenerProperties.java Added Files: EAX20.java Removed Files: BaseEAX.java BaseEAXConstants.java CoreEAX.java Log Message: OpenAL / EAX Refactor --- NEW FILE: EAX20.java --- /* * Copyright (c) 2002 Lightweight 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. */ package org.lwjgl.openal.eax; import java.nio.Buffer; /** * $Id: EAX20.java,v 1.1 2004/02/26 21:51:57 matzon Exp $ * * This is the OpenAL EAX class. It extends the latest core. * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class EAX20 { /** GUID for buffer */ public static final int BUFFER_GUID = 1; /** GUID for listener */ public static final int LISTENER_GUID = 2; public static final int EAX_ENVIRONMENT_GENERIC = 0; public static final int EAX_ENVIRONMENT_PADDEDCELL = 1; public static final int EAX_ENVIRONMENT_ROOM = 2; public static final int EAX_ENVIRONMENT_BATHROOM = 3; public static final int EAX_ENVIRONMENT_LIVINGROOM = 4; public static final int EAX_ENVIRONMENT_STONEROOM = 5; public static final int EAX_ENVIRONMENT_AUDITORIUM = 6; public static final int EAX_ENVIRONMENT_CONCERTHALL = 7; public static final int EAX_ENVIRONMENT_CAVE = 8; public static final int EAX_ENVIRONMENT_ARENA = 9; public static final int EAX_ENVIRONMENT_HANGAR = 10; public static final int EAX_ENVIRONMENT_CARPETEDHALLWAY = 11; public static final int EAX_ENVIRONMENT_HALLWAY = 12; public static final int EAX_ENVIRONMENT_STONECORRIDOR = 13; public static final int EAX_ENVIRONMENT_ALLEY = 14; public static final int EAX_ENVIRONMENT_FOREST = 15; public static final int EAX_ENVIRONMENT_CITY = 16; public static final int EAX_ENVIRONMENT_MOUNTAINS = 17; public static final int EAX_ENVIRONMENT_QUARRY = 18; public static final int EAX_ENVIRONMENT_PLAIN = 19; public static final int EAX_ENVIRONMENT_PARKINGLOT = 20; public static final int EAX_ENVIRONMENT_SEWERPIPE = 21; public static final int EAX_ENVIRONMENT_UNDERWATER = 22; public static final int EAX_ENVIRONMENT_DRUGGED = 23; public static final int EAX_ENVIRONMENT_DIZZY = 24; public static final int EAX_ENVIRONMENT_PSYCHOTIC = 25; public static final int EAX_ENVIRONMENT_COUNT = 26; // Single window material preset public static final int EAX_MATERIAL_SINGLEWINDOW = -2800; public static final float EAX_MATERIAL_SINGLEWINDOWLF = 0.71f; public static final float EAX_MATERIAL_SINGLEWINDOWROOMRATIO = 0.43f; // Double window material preset public static final int EAX_MATERIAL_DOUBLEWINDOW = -5000; public static final float EAX_MATERIAL_DOUBLEWINDOWHF = 0.40f; public static final float EAX_MATERIAL_DOUBLEWINDOWROOMRATIO = 0.24f; // Thin door material preset public static final int EAX_MATERIAL_THINDOOR = -1800; public static final float EAX_MATERIAL_THINDOORLF = 0.66f; public static final float EAX_MATERIAL_THINDOORROOMRATIO = 0.66f; // Thick door material preset public static final int EAX_MATERIAL_THICKDOOR = -4400; public static final float EAX_MATERIAL_THICKDOORLF = 0.64f; public static final float EAX_MATERIAL_THICKDOORROOMRTATION = 0.27f; // Wood wall material preset public static final int EAX_MATERIAL_WOODWALL = -4000; public static final float EAX_MATERIAL_WOODWALLLF = 0.50f; public static final float EAX_MATERIAL_WOODWALLROOMRATIO = 0.30f; // Brick wall material preset public static final int EAX_MATERIAL_BRICKWALL = -5000; public static final float EAX_MATERIAL_BRICKWALLLF = 0.60f; public static final float EAX_MATERIAL_BRICKWALLROOMRATIO = 0.24f; // Stone wall material preset public static final int EAX_MATERIAL_STONEWALL = -6000; public static final float EAX_MATERIAL_STONEWALLLF = 0.68f; public static final float EAX_MATERIAL_STONEWALLROOMRATIO = 0.20f; // Curtain material preset public static final int EAX_MATERIAL_CURTAIN = -1200; public static final float EAX_MATERIAL_CURTAINLF = 0.15f; public static final float EAX_MATERIAL_CURTAINROOMRATIO = 1.00f; /** * Load extensions */ protected static void init() { determineAvailableExtensions(); } /** * Determines available EAX extensions */ protected static native void determineAvailableExtensions(); /** * Retrieves an EAX Value * * @param propertySetID adress to the property set GUID of the object being queried (a listener or a source) * @param property property being queried * @param source the source to be queried * @param data Buffer to write value to * @param size size of area being written to * @return OpenAL Error code */ public static int eaxGet(int propertySetID, int property, int source, Buffer data, int size) { return neaxGet(propertySetID, property, source, data, data.position(), size); } private static native int neaxGet(int propertySetID, int property, int source, Buffer data, int position, int size); /** * Sets an EAX Value * * @param propertySetID adress to the property set GUID of the object being queried (a listener or a source) * @param property property being queried * @param source the source to be queried * @param data Buffer to write value to * @param size size of area being written to * @return OpenAL Error code */ public static int eaxSet(int propertySetID, int property, int source, Buffer data, int size) { return neaxSet(propertySetID, property, source, data, data.position(), size); } private static native int neaxSet(int propertySetID, int property, int source, Buffer data, int position, int size); } Index: EAX.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAX.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- EAX.java 17 Aug 2003 16:38:57 -0000 1.6 +++ EAX.java 26 Feb 2004 21:51:57 -0000 1.7 @@ -39,5 +39,66 @@ * @author Brian Matzon <br...@ma...> * @version $Revision$ */ -public class EAX extends CoreEAX { +public class EAX { + + /** Has the EAX object been created? */ + protected static boolean created; + + static { + initialize(); + } + + /** + * Static initialization + */ + private static void initialize() { + System.loadLibrary(org.lwjgl.Sys.getLibraryName()); + } + + /** + * Loads the EAX functions + * + * @throws Exception if the EAX extensions couldn't be loaded + */ + public static void create() throws Exception { + if (created) { + return; + } + + if (!nCreate()) { + throw new Exception("EAX instance could not be created."); + } + EAX20.init(); + created = true; + } + + /** + * Native method to create EAX instance + * + * @return true if the EAX extensions could be found + */ + protected static native boolean nCreate(); + + /** + * "Destroy" the EAX object + */ + public static void destroy() { + if (!created) { + return; + } + created = false; + nDestroy(); + } + + /** + * Native method the destroy the EAX + */ + protected static native void nDestroy(); + + /** + * @return true if EAX has been created + */ + public static boolean isCreated() { + return created; + } } \ No newline at end of file Index: EAXBufferProperties.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAXBufferProperties.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- EAXBufferProperties.java 6 Jan 2004 19:22:12 -0000 1.11 +++ EAXBufferProperties.java 26 Feb 2004 21:51:57 -0000 1.12 @@ -229,8 +229,8 @@ * Loads current EAX values from current source */ public void loadEAXValues() { - EAX.eaxGet( - CoreEAX.BUFFER_GUID, + EAX20.eaxGet( + EAX20.BUFFER_GUID, EAXBUFFER_ALLPARAMETERS, currentSource, eaxBufferProperties, @@ -271,8 +271,8 @@ */ public void commit() { // call eaxSet with Buffer guid, setting all parameters - EAX.eaxSet( - CoreEAX.BUFFER_GUID, EAXBUFFER_ALLPARAMETERS, + EAX20.eaxSet( + EAX20.BUFFER_GUID, EAXBUFFER_ALLPARAMETERS, currentSource, eaxBufferProperties, EAXBUFFERPROPERTIES_SIZE); } Index: EAXListenerProperties.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAXListenerProperties.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- EAXListenerProperties.java 6 Jan 2004 19:22:12 -0000 1.10 +++ EAXListenerProperties.java 26 Feb 2004 21:51:57 -0000 1.11 @@ -184,9 +184,9 @@ public static final int EAXLISTENER_MINENVIRONMENT = 0; public static final int EAXLISTENER_MAXENVIRONMENT = - (EAX.EAX_ENVIRONMENT_COUNT - 1); + (EAX20.EAX_ENVIRONMENT_COUNT - 1); public static final int EAXLISTENER_DEFAULTENVIRONMENT = - EAX.EAX_ENVIRONMENT_GENERIC; + EAX20.EAX_ENVIRONMENT_GENERIC; public static final float EAXLISTENER_MINENVIRONMENTSIZE = 1.0f; public static final float EAXLISTENER_MAXENVIRONMENTSIZE = 100.0f; @@ -226,8 +226,8 @@ * Loads current EAX values */ public void loadEAXValues() { - EAX.eaxGet( - CoreEAX.LISTENER_GUID, + EAX20.eaxGet( + EAX20.LISTENER_GUID, EAXLISTENER_ALLPARAMETERS, 0, eaxListenerProperties, @@ -269,8 +269,8 @@ */ public void commit() { // call eaxSet with Listener guid, setting all parameters - EAX.eaxSet( - CoreEAX.LISTENER_GUID, EAXLISTENER_ALLPARAMETERS | EAXLISTENER_IMMEDIATE, + EAX20.eaxSet( + EAX20.LISTENER_GUID, EAXLISTENER_ALLPARAMETERS | EAXLISTENER_IMMEDIATE, 0, eaxListenerProperties, EAXLISTENERPROPERTIES_SIZE); } @@ -575,8 +575,8 @@ // only the environment value and its size. Also pass the // EAXLISTENER_ENVIRONMENT value (and since we're committing IMMEDIATE too) if (autoCommit) { - EAX.eaxSet( - CoreEAX.LISTENER_GUID, EAXLISTENER_ENVIRONMENT | EAXLISTENER_IMMEDIATE, + EAX20.eaxSet( + EAX20.LISTENER_GUID, EAXLISTENER_ENVIRONMENT | EAXLISTENER_IMMEDIATE, 0, eaxListenerProperties.position(environment_offset), 4); // rewind buffer @@ -609,8 +609,8 @@ // only the environment size value and its size. Also pass the // EAXLISTENER_ENVIRONMENTSIZE value (and since we're committing IMMEDIATE too) if (autoCommit) { - EAX.eaxSet( - CoreEAX.LISTENER_GUID, EAXLISTENER_ENVIRONMENTSIZE | EAXLISTENER_IMMEDIATE, + EAX20.eaxSet( + EAX20.LISTENER_GUID, EAXLISTENER_ENVIRONMENTSIZE | EAXLISTENER_IMMEDIATE, 0, eaxListenerProperties.position(environmentSize_offset), 4); // rewind buffer --- BaseEAX.java DELETED --- --- BaseEAXConstants.java DELETED --- --- CoreEAX.java DELETED --- |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6429/java/org/lwjgl/openal Modified Files: AL.java Added Files: AL10.java Removed Files: ALConstants.java BaseAL.java BaseALConstants.java CoreAL.java Log Message: OpenAL / EAX Refactor --- NEW FILE: AL10.java --- /* * Copyright (c) 2002 Lightweight 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. * [...1171 lines suppressed...] * </p> * <p> * There are two API calls global to the current context that provide control of the two * related parameters. * </p> * <p> * AL_DOPPLER_VELOCITY allows the application to change the reference (propagation) * velocity used in the Doppler Effect calculation. This permits the application to use a * velocity scale appropriate to its purposes. * </p> * <p> * A negative or zero value will result in an AL_INVALID_VALUE error, the command is * then ignored. The default value is 1. The current setting can be queried using * GetFloatv and AL_DOPPLER_VELOCITY. * </p> * * @param value Doppler velocity value to set */ public static native void alDopplerVelocity(float value); } Index: AL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- AL.java 8 Jan 2004 22:41:22 -0000 1.16 +++ AL.java 26 Feb 2004 21:51:57 -0000 1.17 @@ -31,6 +31,13 @@ */ package org.lwjgl.openal; +import java.io.File; +import java.lang.reflect.Method; +import java.util.StringTokenizer; + +import org.lwjgl.Display; +import org.lwjgl.Sys; + /** * $Id$ * <br> @@ -39,7 +46,7 @@ * @author Brian Matzon <br...@ma...> * @version $Revision$ */ -public abstract class AL extends CoreAL { +public abstract class AL { /** ALC instance. */ protected static ALC alc; @@ -53,7 +60,8 @@ /** * String that requests a certain device or device configuration. * If null is specified, the implementation will provide an - * implementation specific default. */ + * implementation specific default. + */ protected static String deviceArguments; /** Frequency for mixing output buffer, in units of Hz. */ @@ -65,6 +73,40 @@ /** Flag, indicating a synchronous context. */ protected static int contextSynchronized = ALC.ALC_FALSE; + /** Have we been created? */ + protected static boolean created; + + static { + initialize(); + } + + /** + * Static initialization + */ + private static void initialize() { + System.loadLibrary(org.lwjgl.Sys.getLibraryName()); + } + + /** + * Native method to create AL instance + * + * @param oalPaths Array of strings containing paths to search for OpenAL library + * @return true if the AL creation process succeeded + */ + protected static native void nCreate(String[] oalPaths) throws OpenALException; + + /** + * Native method the destroy the AL + */ + protected static native void nDestroy(); + + /** + * @return true if AL has been created + */ + public static boolean isCreated() { + return created; + } + /** * Creates an OpenAL instance. Using this constructor will cause OpenAL to * open the device using supplied device argument, and create a context using the context values @@ -99,10 +141,52 @@ if(created) { return; } + + // need to pass path of possible locations of OAL to native side + String libpath = System.getProperty("java.library.path"); + String seperator = System.getProperty("path.separator"); + String libname; + String jwsLibname; + + // libname is hardcoded atm - this will change in a near future... + switch (Display.getPlatform()) { + case Display.PLATFORM_WGL: + libname = "lwjglaudio.dll"; + jwsLibname = "lwjglaudio"; + break; + case Display.PLATFORM_GLX: + libname = "libopenal.so"; + jwsLibname = "openal"; + break; + case Display.PLATFORM_AGL: + libname = "openal.dylib"; + jwsLibname = "openal"; + break; + default: + throw new OpenALException("Unknown platform"); + } - BaseAL.create(); + String jwsPath = getPathFromJWS(jwsLibname); + if (jwsPath != null) { + libpath += seperator + + jwsPath.substring(0, jwsPath.lastIndexOf(File.separator)); + } - ALC.create(); + StringTokenizer st = new StringTokenizer(libpath, seperator); + + //create needed string array + String[] oalPaths = new String[st.countTokens() + 1]; + + //build paths + for (int i = 0; i < oalPaths.length - 1; i++) { + oalPaths[i] = st.nextToken() + File.separator + libname; + } + + //add cwd path + oalPaths[oalPaths.length - 1] = libname; + nCreate(oalPaths); + + ALC.create(); device = ALC.alcOpenDevice(deviceArguments); @@ -118,6 +202,7 @@ ALC.alcMakeContextCurrent(context.context); + created = true; } /** @@ -140,7 +225,36 @@ contextFrequency = -1; contextRefresh = -1; contextSynchronized = ALC.ALC_FALSE; - - BaseAL.destroy(); + + created = false; + nDestroy(); } + + /** + * Tries to locate OpenAL from the JWS Library path + * This method exists because OpenAL is loaded from native code, and as such + * is exempt from JWS library loading rutines. OpenAL therefore always fails. + * We therefore invoke the protected method of the JWS classloader to see if it can + * locate it. + * + * @param libname Name of library to search for + * @return Absolute path to library if found, otherwise null + */ + private static String getPathFromJWS(String libname) { + try { + + Sys.log("JWS Classloader looking for: " + libname); + + Object o = AL.class.getClassLoader(); + Class c = o.getClass(); + Method findLibrary = + c.getMethod("findLibrary", new Class[] { String.class }); + Object[] arguments = new Object[] { libname }; + return (String) findLibrary.invoke(o, arguments); + + } catch (Exception e) { + Sys.log("Failure locating OpenAL using classloader:" + e); + } + return null; + } } \ No newline at end of file --- ALConstants.java DELETED --- --- BaseAL.java DELETED --- --- BaseALConstants.java DELETED --- --- CoreAL.java DELETED --- |
From: <ma...@us...> - 2004-02-26 22:04:02
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5647 Modified Files: Window.java Log Message: fixed import Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- Window.java 24 Feb 2004 14:31:34 -0000 1.26 +++ Window.java 26 Feb 2004 21:47:58 -0000 1.27 @@ -47,8 +47,6 @@ * @author foo */ -import java.util.HashSet; - import org.lwjgl.Display; import org.lwjgl.Sys; |
From: <ma...@us...> - 2004-02-26 21:55:29
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3793 Removed Files: org_lwjgl_Sys.h Log Message: *puff* --- org_lwjgl_Sys.h DELETED --- |
From: <eli...@us...> - 2004-02-25 18:24:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16841/src/native/linux Modified Files: org_lwjgl_opengl_Window.cpp Log Message: Fixed up linux for JOGL integration work Index: org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- org_lwjgl_opengl_Window.cpp 25 Feb 2004 16:44:45 -0000 1.18 +++ org_lwjgl_opengl_Window.cpp 25 Feb 2004 18:09:10 -0000 1.19 @@ -457,7 +457,7 @@ * Signature: (IIII)Z */ 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, jint samples, jobject ext_set) + (JNIEnv * env, jclass clazz, jstring title, jint x, jint y, jint width, jint height, jboolean fullscreen, jint bpp, jint alpha, jint depth, jint stencil, jint samples) { int screen; Display *disp; @@ -493,7 +493,7 @@ throwException(env, "Could not create window"); return; } - if (!extgl_Initialize(env, ext_set)) { +/* if (!extgl_Initialize(env, ext_set)) { destroy(); throwException(env, "Could not init gl function pointers"); return; @@ -501,7 +501,7 @@ if (ISDEBUGENABLED()) { const GLubyte * extensions = glGetString(GL_EXTENSIONS); printf("Supported extensions: %s\n", extensions); - } + }*/ } /* |
From: <eli...@us...> - 2004-02-25 18:24:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16841/src/native/common Modified Files: Makefile.am extgl.cpp extgl.h Log Message: Fixed up linux for JOGL integration work Index: Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/Makefile.am,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Makefile.am 15 Feb 2004 15:20:32 -0000 1.18 +++ Makefile.am 25 Feb 2004 18:08:57 -0000 1.19 @@ -34,6 +34,7 @@ org_lwjgl_openal_eax_EAXBufferProperties.h \ org_lwjgl_openal_eax_EAXListenerProperties.cpp \ org_lwjgl_openal_eax_EAXListenerProperties.h \ + org_lwjgl_opengl_GLContext.cpp \ org_lwjgl_opengl_GL11.cpp \ org_lwjgl_opengl_GL11.h \ org_lwjgl_opengl_GL12.cpp \ Index: extgl.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- extgl.cpp 23 Feb 2004 23:42:57 -0000 1.20 +++ extgl.cpp 25 Feb 2004 18:08:57 -0000 1.21 @@ -734,69 +734,40 @@ } static bool QueryExtension(JNIEnv *env, jobject ext_set, const GLubyte*extensions, const char *name) - { - const GLubyte *start; - GLubyte *where, *terminator; - - if (extensions == NULL) { - printfDebug("NULL extension string\n"); - extgl_error = true; - return false; - } /* Extension names should not have spaces. */ - where = (GLubyte *) strchr(name, ' '); - if (where || *name == '\0') - return false; /* It takes a bit of care to be fool-proof about parsing the - OpenGL extensions string. Don't be fooled by sub-strings, - etc. */ - start = extensions; - for (;;) - { - where = (GLubyte *) strstr((const char *) start, name); - if (!where) - break; - terminator = where + strlen(name); - if (where == start || *(where - 1) == ' ') - if (*terminator == ' ' || *terminator == '\0') { - if (ext_set != NULL) { insertExtension(env, ext_set, name); } - return true; - } - start = terminator; - } - return false; } @@ -976,10 +947,10 @@ #ifdef _X11 /** returns true if the extention is available */ -static bool GLXQueryExtension(JNIEnv* env, jobject ext_set, Display *disp, int screen, const char *name) +static bool GLXQueryExtension(JNIEnv* env, Display *disp, int screen, const char *name) { const GLubyte *exts = (const GLubyte *)glXQueryExtensionsString(disp, screen); - return QueryExtension(env, ext_set, exts, name); + return QueryExtension(env, NULL, exts, name); } #endif @@ -1022,7 +993,7 @@ */ #ifdef _X11 -static void extgl_InitGLX13(JNIEnv *env, jobject ext_set) +static void extgl_InitGLX13(JNIEnv *env) { if (extgl_Extensions.GLX13 != 1) return; @@ -1044,7 +1015,7 @@ glXQueryContext = (glXQueryContextPROC) extgl_GetProcAddress("glXQueryContext"); glXSelectEvent = (glXSelectEventPROC) extgl_GetProcAddress("glXSelectEvent"); glXGetSelectedEvent = (glXGetSelectedEventPROC) extgl_GetProcAddress("glXGetSelectedEvent"); - EXTGL_SANITY_CHECK(env, ext_set, GLX13) + EXTGL_SANITY_CHECK(env, (jobject)NULL, GLX13); } static bool extgl_InitGLX12(void) @@ -1072,23 +1043,23 @@ return !extgl_error; } -static void extgl_InitGLXSupportedExtensions(JNIEnv *env, jobject ext_set, Display *disp, int screen) +static void extgl_InitGLXSupportedExtensions(JNIEnv *env, Display *disp, int screen) { - extgl_Extensions.GLX_EXT_visual_info = GLXQueryExtension(env, ext_set, disp, screen, "GLX_EXT_visual_info"); - extgl_Extensions.GLX_EXT_visual_rating = GLXQueryExtension(env, ext_set, disp, screen, "GLX_EXT_visual_rating"); - extgl_Extensions.GLX_SGI_swap_control = GLXQueryExtension(env, ext_set, disp, screen, "GLX_SGI_swap_control"); - extgl_Extensions.GLX_ARB_multisample = GLXQueryExtension(env, ext_set, disp, screen, "GLX_ARB_multisample"); + 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"); } -static void extgl_InitGLXSGISwapControl(JNIEnv *env, jobject ext_set) +static void extgl_InitGLXSGISwapControl(JNIEnv *env) { if (extgl_Extensions.GLX_SGI_swap_control != 1) return; glXSwapIntervalSGI = (glXSwapIntervalSGIPROC)extgl_GetProcAddress("glXSwapIntervalSGI"); - EXTGL_SANITY_CHECK(env, ext_set, GLX_SGI_swap_control) + EXTGL_SANITY_CHECK(env, (jobject)NULL, GLX_SGI_swap_control); } -bool extgl_InitGLX(JNIEnv *env, jobject ext_set, Display *disp, int screen) +bool extgl_InitGLX(JNIEnv *env, Display *disp, int screen) { int major, minor; /* Assume glx ver >= 1.2 */ @@ -1098,13 +1069,13 @@ return false; if (!extgl_InitGLX12()) return false; - extgl_InitGLXSupportedExtensions(env, ext_set, disp, screen); + extgl_InitGLXSupportedExtensions(env, disp, screen); if (glXQueryVersion(disp, &major, &minor) != True) return false; if (major > 1 || (major == 1 && minor >= 3)) extgl_Extensions.GLX13 = true; - extgl_InitGLX13(env, ext_set); - extgl_InitGLXSGISwapControl(env, ext_set); + extgl_InitGLX13(env); + extgl_InitGLXSGISwapControl(env); return true; } #endif Index: extgl.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- extgl.h 23 Feb 2004 23:42:56 -0000 1.27 +++ extgl.h 25 Feb 2004 18:09:01 -0000 1.28 @@ -3291,7 +3291,7 @@ void extgl_removeExtension(JNIEnv *env, jobject ext_set, const char *ext); #define EXTGL_SANITY_CHECK(e,h,x) if (extgl_error) { \ - extgl_Extensions.x = 0; \ + extgl_Extensions.x = false; \ printf("NOTICE: %s disabled because of missing driver symbols\n", #x); \ extgl_error = false; \ if (h != NULL) { \ |
From: <eli...@us...> - 2004-02-25 16:59:53
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29230/linux Modified Files: org_lwjgl_opengl_Window.cpp Log Message: Small linux fix Index: org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- org_lwjgl_opengl_Window.cpp 18 Feb 2004 17:48:26 -0000 1.17 +++ org_lwjgl_opengl_Window.cpp 25 Feb 2004 16:44:45 -0000 1.18 @@ -475,7 +475,7 @@ return; } screen = XDefaultScreen(disp); - if (!extgl_InitGLX(env, ext_set, disp, screen)) { + if (!extgl_InitGLX(env, disp, screen)) { XCloseDisplay(disp); extgl_Close(); throwException(env, "Could not init GLX"); |
From: <ci...@us...> - 2004-02-24 14:46:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26060/src/native/common Modified Files: org_lwjgl_opengl_GLContext.cpp org_lwjgl_opengl_GLContext.h Log Message: New context stuff - complete for win32, incomplete for linux / mac Index: org_lwjgl_opengl_GLContext.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLContext.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_GLContext.cpp 23 Feb 2004 23:42:56 -0000 1.1 +++ org_lwjgl_opengl_GLContext.cpp 24 Feb 2004 14:31:35 -0000 1.2 @@ -37,25 +37,12 @@ /* * Class: org_lwjgl_opengl_GLContext * Method: init - * Signature: (Ljava/util/Set;)I + * Signature: (Ljava/util/Set;)V */ -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GLContext_init +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_init (JNIEnv * env, jclass clazz, jobject exts) { if (!extgl_Initialize(env, exts)) { throwException(env, "Failed to initialize GL extensions"); - return -1; } - - return 0; } - -/* - * Class: org_lwjgl_opengl_GLContext - * Method: reinit - * Signature: (I)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_reinit - (JNIEnv * env, jclass clazz, jint context) -{ -} \ No newline at end of file Index: org_lwjgl_opengl_GLContext.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLContext.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_GLContext.h 23 Feb 2004 23:42:57 -0000 1.1 +++ org_lwjgl_opengl_GLContext.h 24 Feb 2004 14:31:35 -0000 1.2 @@ -119,19 +119,11 @@ /* * Class: org_lwjgl_opengl_GLContext * Method: init - * Signature: (Ljava/util/Set;)I + * Signature: (Ljava/util/Set;)V */ -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GLContext_init +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_init (JNIEnv *, jclass, jobject); -/* - * Class: org_lwjgl_opengl_GLContext - * Method: reinit - * Signature: (I)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_reinit - (JNIEnv *, jclass, jint); - #ifdef __cplusplus } #endif |
From: <ci...@us...> - 2004-02-24 14:46:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26060/src/java/org/lwjgl/test/opengl Modified Files: Grass.java Game.java Log Message: New context stuff - complete for win32, incomplete for linux / mac Index: Grass.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Grass.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Grass.java 23 Feb 2004 16:30:48 -0000 1.29 +++ Grass.java 24 Feb 2004 14:31:35 -0000 1.30 @@ -81,7 +81,7 @@ mode = i; break; } - } + } if (mode == -1) { System.out.println("did not find suitable mode"); Index: Game.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Game.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Game.java 15 Feb 2004 15:34:57 -0000 1.29 +++ Game.java 24 Feb 2004 14:31:37 -0000 1.30 @@ -185,7 +185,7 @@ GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight()); - ByteBuffer num_tex_units_buf = ByteBuffer.allocateDirect(4); + ByteBuffer num_tex_units_buf = ByteBuffer.allocateDirect(64); num_tex_units_buf.order(ByteOrder.nativeOrder()); GL11.glGetInteger(GL13.GL_MAX_TEXTURE_UNITS, num_tex_units_buf.asIntBuffer()); System.out.println("Number of texture units: " + num_tex_units_buf.getInt()); |
From: <ci...@us...> - 2004-02-24 14:46:37
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26060/src/java/org/lwjgl/opengl Modified Files: GLContext.java Window.java Log Message: New context stuff - complete for win32, incomplete for linux / mac Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- GLContext.java 23 Feb 2004 23:51:55 -0000 1.4 +++ GLContext.java 24 Feb 2004 14:31:34 -0000 1.5 @@ -35,9 +35,7 @@ import java.lang.ref.WeakReference; import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import java.util.HashMap; import java.util.HashSet; -import java.util.Map; import java.util.Set; import org.lwjgl.Sys; @@ -56,13 +54,7 @@ /** The currently initialised context */ private static WeakReference currentContext; - - /** A map of WeakReferences to contexts to LWJGL pointers-to-extension-structs */ - private static final Map contextMap = new HashMap(); - - /** A map of WeakReferences to contents to Sets of extension names */ - private static final Map extensionsMap = new HashMap(); - + /* * Available extensions */ @@ -212,7 +204,10 @@ * in the future, freeing up a little RAM. * @param context The context object, which uniquely identifies a GL context */ - public static synchronized void setContext(Object context) { + public static synchronized void useContext(Object context) { + if (context == null) { + throw new NullPointerException("Can't use a null context"); + } // Is this the same as last time? Object current = currentContext == null ? null : currentContext.get(); if (current == context) { @@ -222,35 +217,16 @@ // Ok, now it's the current context. currentContext = new WeakReference(context); - - // Look in the context map to see if we've encountered this context before - Integer encountered = (Integer) contextMap.get(currentContext); - Set exts; - if (encountered != null) { - exts = (Set) extensionsMap.get(currentContext); - reinit(encountered.intValue()); - } else { - exts = new HashSet(); - contextMap.put(currentContext, new Integer(init(exts))); - } - + HashSet exts = new HashSet(); + init(exts); determineAvailableExtensions(exts); - VBOTracker.setCurrent(currentContext); } /** - * Native method to initialize a context from scratch or load its function pointers from a - * cache. + * Native method to initialize a context * @param exts An empty Set of Strings that will be filled with the names of enabled extensions - * @return a LWJGL context-index-pointer - */ - private static native int init(Set exts); - - /** - * Native method to re-initialize a context. - * @param context Hash code of the context object */ - private static native void reinit(int context); + private static native void init(Set exts); } Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Window.java 23 Feb 2004 23:42:55 -0000 1.25 +++ Window.java 24 Feb 2004 14:31:34 -0000 1.26 @@ -225,7 +225,7 @@ public static synchronized void makeCurrent() { assert isCreated() : "No window has been created."; nMakeCurrent(); - GLContext.setContext(context); + GLContext.useContext(context); } /** |
From: <ci...@us...> - 2004-02-24 14:45:56
|
Update of /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26060/platform_build/win32_vs_net Modified Files: lwjgl.vcproj lwjgl.suo Log Message: New context stuff - complete for win32, incomplete for linux / mac Index: lwjgl.vcproj =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lwjgl.vcproj 31 Jan 2004 12:34:20 -0000 1.1 +++ lwjgl.vcproj 24 Feb 2004 14:31:37 -0000 1.2 @@ -177,7 +177,7 @@ RelativePath="..\..\src\native\common\org_lwjgl_opengl_GL14.cpp"> </File> <File - RelativePath="..\..\src\native\common\org_lwjgl_opengl_GLU.cpp"> + RelativePath="..\..\src\native\common\org_lwjgl_opengl_GL15.cpp"> </File> </Filter> <Filter @@ -202,6 +202,9 @@ RelativePath="..\..\src\native\win32\org_lwjgl_input_Mouse.cpp"> </File> <File + RelativePath="..\..\src\native\common\org_lwjgl_opengl_GLContext.cpp"> + </File> + <File RelativePath="..\..\src\native\win32\org_lwjgl_opengl_Pbuffer.cpp"> </File> <File @@ -218,157 +221,160 @@ Name="arb" Filter=""> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBMatrixPalette.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBImaging.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBMultisample.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBMatrixPalette.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBMultitexture.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBMultisample.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBOcclusionQuery.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBMultitexture.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBPointParameters.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBOcclusionQuery.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBProgram.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBPointParameters.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBShaderObjects.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBProgram.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBTextureCompression.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBShaderObjects.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBTransposeMatrix.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBTextureCompression.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBVertexBlend.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBTransposeMatrix.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBVertexBufferObject.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBVertexBlend.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBVertexProgram.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBVertexBufferObject.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBVertexShader.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBVertexProgram.cpp"> </File> <File - RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_arb_ARBWindowPos.cpp"> + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBVertexShader.cpp"> + </File> + <File + RelativePath="..\..\src\native\common\arb\org_lwjgl_opengl_ARBWindowPos.cpp"> </File> </Filter> <Filter Name="ati" Filter=""> <File - RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ati_ATIDrawBuffers.cpp"> + RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ATIDrawBuffers.cpp"> </File> <File - RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ati_ATIElementArray.cpp"> + RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ATIElementArray.cpp"> </File> <File - RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ati_ATIEnvmapBumpmap.cpp"> + RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ATIEnvmapBumpmap.cpp"> </File> <File - RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ati_ATIFragmentShader.cpp"> + RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ATIFragmentShader.cpp"> </File> <File - RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ati_ATIMapObjectBuffer.cpp"> + RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ATIMapObjectBuffer.cpp"> </File> <File - RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ati_ATIPnTriangles.cpp"> + RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ATIPnTriangles.cpp"> </File> <File - RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ati_ATISeparateStencil.cpp"> + RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ATISeparateStencil.cpp"> </File> <File - RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ati_ATIVertexArrayObject.cpp"> + RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ATIVertexArrayObject.cpp"> </File> <File - RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ati_ATIVertexAttribArrayObject.cpp"> + RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ATIVertexAttribArrayObject.cpp"> </File> <File - RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ati_ATIVertexStreams.cpp"> + RelativePath="..\..\src\native\common\ati\org_lwjgl_opengl_ATIVertexStreams.cpp"> </File> </Filter> <Filter Name="ext" Filter=""> <File - RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_ext_EXTBlendFuncSeparate.cpp"> + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTBlendFuncSeparate.cpp"> </File> <File - RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_ext_EXTCompiledVertexArray.cpp"> + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTCompiledVertexArray.cpp"> </File> <File - RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_ext_EXTDrawRangeElements.cpp"> + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTDrawRangeElements.cpp"> </File> <File - RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_ext_EXTFogCoord.cpp"> + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTFogCoord.cpp"> </File> <File - RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_ext_EXTMultiDrawArrays.cpp"> + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTMultiDrawArrays.cpp"> </File> <File - RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_ext_EXTPointParameters.cpp"> + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTPointParameters.cpp"> </File> <File - RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_ext_EXTSecondaryColor.cpp"> + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTSecondaryColor.cpp"> </File> <File - RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_ext_EXTStencilTwoSide.cpp"> + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTStencilTwoSide.cpp"> </File> <File - RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_ext_EXTVertexShader.cpp"> + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTVertexShader.cpp"> </File> <File - RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_ext_EXTVertexWeighting.cpp"> + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTVertexWeighting.cpp"> </File> </Filter> <Filter Name="nv" Filter=""> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVEvaluators.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVEvaluators.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVFence.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVFence.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVFragmentProgram.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVFragmentProgram.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVHalfFloat.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVHalfFloat.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVOcclusionQuery.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVOcclusionQuery.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVPixelDataRange.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVPixelDataRange.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVPointSprite.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVPointSprite.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVPrimitiveRestart.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVPrimitiveRestart.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVProgram.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVProgram.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVRegisterCombiners.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVRegisterCombiners.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVRegisterCombiners2.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVRegisterCombiners2.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVVertexArrayRange.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVVertexArrayRange.cpp"> </File> <File - RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_nv_NVVertexProgram.cpp"> + RelativePath="..\..\src\native\common\nv\org_lwjgl_opengl_NVVertexProgram.cpp"> </File> </Filter> </Filter> Index: lwjgl.suo =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl.suo,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvs0WGNKE and /tmp/cvsSktTnq differ |
From: <ci...@us...> - 2004-02-24 14:45:56
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26060/src/java/org/lwjgl Modified Files: Sys.java Log Message: New context stuff - complete for win32, incomplete for linux / mac Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- Sys.java 23 Feb 2004 23:42:57 -0000 1.40 +++ Sys.java 24 Feb 2004 14:31:39 -0000 1.41 @@ -204,7 +204,7 @@ */ public static void alert(String title, String message) { String osName = System.getProperty("os.name"); - if (osName.startsWith("Windoxws")) { + if (osName.startsWith("Windows")) { nAlert(title, message); } else { try { |
From: <ci...@us...> - 2004-02-24 00:05:42
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25729/src/java/org/lwjgl/opengl Modified Files: GLContext.java Log Message: New context management code (incomplete) Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- GLContext.java 23 Feb 2004 23:42:55 -0000 1.3 +++ GLContext.java 23 Feb 2004 23:51:55 -0000 1.4 @@ -235,6 +235,8 @@ } determineAvailableExtensions(exts); + + VBOTracker.setCurrent(currentContext); } /** |
From: <ci...@us...> - 2004-02-23 23:57:13
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23682/src/java/org/lwjgl/opengl Modified Files: GLContext.java Window.java Log Message: New context management code (incomplete) Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- GLContext.java 23 Feb 2004 16:30:47 -0000 1.2 +++ GLContext.java 23 Feb 2004 23:42:55 -0000 1.3 @@ -36,7 +36,7 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.HashMap; -import java.util.Iterator; +import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -60,6 +60,9 @@ /** A map of WeakReferences to contexts to LWJGL pointers-to-extension-structs */ private static final Map contextMap = new HashMap(); + /** A map of WeakReferences to contents to Sets of extension names */ + private static final Map extensionsMap = new HashMap(); + /* * Available extensions */ @@ -132,9 +135,6 @@ public static boolean GL_ATI_vertex_streams; public static boolean GL_ATI_separate_stencil; - public static boolean GL_ATIX_point_sprites; - public static boolean GL_ATIX_texture_env_route; - public static boolean GL_NV_blend_square; public static boolean GL_NV_copy_depth_to_color; public static boolean GL_NV_depth_clamp; @@ -177,25 +177,6 @@ System.loadLibrary(Sys.getLibraryName()); } - private static void setExtensionFields(Set exts, HashMap field_map) { - Sys.log("Available extensions:"); - Iterator it = exts.iterator(); - while ( it.hasNext() ) { - String ext = (String)it.next(); - Sys.log(ext); - - Field f = (Field)field_map.get(ext); - if ( f != null ) { - try { - f.setBoolean(GLContext.class, true); - } catch (IllegalAccessException e) { - e.printStackTrace(System.err); - } - } - - } - } - /** * Determine which extensions are available. Use this to initialize capability fields. Can only be * called _after_ a GLWindow or Pbuffer has been created (or a context from some other GL library). @@ -204,23 +185,19 @@ * * @param exts A Set of OpenGL extension string names */ - public static void determineAvailableExtensions(Set exts) { + private static void determineAvailableExtensions(Set exts) { // Grab all the public static booleans out of this class Field[] fields = GLContext.class.getDeclaredFields(); - HashMap map = new HashMap(fields.length); for ( int i = 0; i < fields.length; i++ ) { if ( Modifier.isStatic(fields[i].getModifiers()) && fields[i].getType() == boolean.class ) { - map.put(fields[i].getName(), fields[i]); // reset fields try { - fields[i].setBoolean(GLContext.class, false); + fields[i].setBoolean(GLContext.class, exts.contains(fields[i].getName())); } catch (IllegalAccessException e) { e.printStackTrace(System.err); } } } - - setExtensionFields(exts, map); } /** @@ -248,27 +225,30 @@ // Look in the context map to see if we've encountered this context before Integer encountered = (Integer) contextMap.get(currentContext); + Set exts; if (encountered != null) { + exts = (Set) extensionsMap.get(currentContext); reinit(encountered.intValue()); } else { - contextMap.put(currentContext, new Integer(init())); + exts = new HashSet(); + contextMap.put(currentContext, new Integer(init(exts))); } - // Now determine the available extensions - + determineAvailableExtensions(exts); } /** * Native method to initialize a context from scratch or load its function pointers from a * cache. + * @param exts An empty Set of Strings that will be filled with the names of enabled extensions * @return a LWJGL context-index-pointer */ - private static native int init(); + private static native int init(Set exts); /** * Native method to re-initialize a context. * @param context Hash code of the context object */ - private static native int reinit(int context); + private static native void reinit(int context); } Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Window.java 23 Feb 2004 16:30:47 -0000 1.24 +++ Window.java 23 Feb 2004 23:42:55 -0000 1.25 @@ -308,16 +308,13 @@ int alpha, int depth, int stencil, - int samples, - HashSet extensions) + int samples) throws Exception; private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws Exception { - HashSet extensions = new HashSet(); - nCreate(title, x, y, width, height, fullscreen, bpp, alpha, depth, stencil, samples, extensions); + nCreate(title, x, y, width, height, fullscreen, bpp, alpha, depth, stencil, samples); context = new Window(); makeCurrent(); - GLContext.determineAvailableExtensions(extensions); } /** |
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23682/src/native/common Modified Files: extgl.h org_lwjgl_opengl_Window.h extgl.cpp Added Files: org_lwjgl_opengl_GLContext.cpp org_lwjgl_opengl_GLContext.h Log Message: New context management code (incomplete) --- NEW FILE: org_lwjgl_opengl_GLContext.cpp --- /* * Copyright (c) 2002 Lightweight 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. */ #include "org_lwjgl_opengl_GLContext.h" #include "extgl.h" #include "checkGLerror.h" /* * Class: org_lwjgl_opengl_GLContext * Method: init * Signature: (Ljava/util/Set;)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GLContext_init (JNIEnv * env, jclass clazz, jobject exts) { if (!extgl_Initialize(env, exts)) { throwException(env, "Failed to initialize GL extensions"); return -1; } return 0; } /* * Class: org_lwjgl_opengl_GLContext * Method: reinit * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_reinit (JNIEnv * env, jclass clazz, jint context) { } --- NEW FILE: org_lwjgl_opengl_GLContext.h --- /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_opengl_GLContext */ #ifndef _Included_org_lwjgl_opengl_GLContext #define _Included_org_lwjgl_opengl_GLContext #ifdef __cplusplus extern "C" { #endif /* Inaccessible static: currentContext */ /* Inaccessible static: contextMap */ /* Inaccessible static: extensionsMap */ /* Inaccessible static: GL_ARB_imaging */ /* Inaccessible static: GL_ARB_depth_texture */ /* Inaccessible static: GL_ARB_fragment_program */ /* Inaccessible static: GL_ARB_fragment_shader */ /* Inaccessible static: GL_ARB_matrix_palette */ /* Inaccessible static: GL_ARB_multisample */ /* Inaccessible static: GL_ARB_multitexture */ /* Inaccessible static: GL_ARB_occlusion_query */ /* Inaccessible static: GL_ARB_point_parameters */ /* Inaccessible static: GL_ARB_point_sprite */ /* Inaccessible static: GL_ARB_shading_language */ /* Inaccessible static: GL_ARB_shader_objects */ /* Inaccessible static: GL_ARB_shadow */ /* Inaccessible static: GL_ARB_shadow_ambient */ /* Inaccessible static: GL_ARB_texture_compression */ /* Inaccessible static: GL_ARB_texture_env_add */ /* Inaccessible static: GL_ARB_texture_env_dot3 */ /* Inaccessible static: GL_ARB_texture_env_combine */ /* Inaccessible static: GL_ARB_texture_env_crossbar */ /* Inaccessible static: GL_ARB_texture_border_clamp */ /* Inaccessible static: GL_ARB_texture_cube_map */ /* Inaccessible static: GL_ARB_texture_mirrored_repeat */ /* Inaccessible static: GL_ARB_texture_non_power_of_two */ /* Inaccessible static: GL_ARB_transpose_matrix */ /* Inaccessible static: GL_ARB_vertex_blend */ /* Inaccessible static: GL_ARB_vertex_program */ /* Inaccessible static: GL_ARB_vertex_buffer_object */ /* Inaccessible static: GL_ARB_vertex_shader */ /* Inaccessible static: GL_ARB_window_pos */ /* Inaccessible static: GL_EXT_abgr */ /* Inaccessible static: GL_EXT_bgra */ /* Inaccessible static: GL_EXT_blend_function_separate */ /* Inaccessible static: GL_EXT_blend_subtract */ /* Inaccessible static: GL_EXT_compiled_vertex_array */ /* Inaccessible static: GL_EXT_draw_range_elements */ /* Inaccessible static: GL_EXT_multi_draw_arrays */ /* Inaccessible static: GL_EXT_fog_coord */ /* Inaccessible static: GL_EXT_packed_pixels */ /* Inaccessible static: GL_EXT_point_parameters */ /* Inaccessible static: GL_EXT_rescale_normal */ /* Inaccessible static: GL_EXT_secondary_color */ /* Inaccessible static: GL_EXT_separate_specular_color */ /* Inaccessible static: GL_EXT_shadow_funcs */ /* Inaccessible static: GL_EXT_shared_texture_palette */ /* Inaccessible static: GL_EXT_stencil_two_side */ /* Inaccessible static: GL_EXT_stencil_wrap */ /* Inaccessible static: GL_EXT_texture_compression_s3tc */ /* Inaccessible static: GL_EXT_texture_env_combine */ /* Inaccessible static: GL_EXT_texture_env_dot3 */ /* Inaccessible static: GL_EXT_texture_filter_anisotropic */ /* Inaccessible static: GL_EXT_texture_lod_bias */ /* Inaccessible static: GL_EXT_texture_rectangle */ /* Inaccessible static: GL_EXT_vertex_shader */ /* Inaccessible static: GL_EXT_vertex_weighting */ /* Inaccessible static: GL_ATI_draw_buffers */ /* Inaccessible static: GL_ATI_element_array */ /* Inaccessible static: GL_ATI_envmap_bumpmap */ /* Inaccessible static: GL_ATI_fragment_shader */ /* Inaccessible static: GL_ATI_map_object_buffer */ /* Inaccessible static: GL_ATI_pn_triangles */ /* Inaccessible static: GL_ATI_texture_float */ /* Inaccessible static: GL_ATI_texture_mirror_once */ /* Inaccessible static: GL_ATI_vertex_array_object */ /* Inaccessible static: GL_ATI_vertex_attrib_array_object */ /* Inaccessible static: GL_ATI_vertex_streams */ /* Inaccessible static: GL_ATI_separate_stencil */ /* Inaccessible static: GL_ATIX_point_sprites */ /* Inaccessible static: GL_ATIX_texture_env_route */ /* Inaccessible static: GL_NV_blend_square */ /* Inaccessible static: GL_NV_copy_depth_to_color */ /* Inaccessible static: GL_NV_depth_clamp */ /* Inaccessible static: GL_NV_evaluators */ /* Inaccessible static: GL_NV_fence */ /* Inaccessible static: GL_NV_fragment_program */ /* Inaccessible static: GL_NV_float_buffer */ /* Inaccessible static: GL_NV_fog_distance */ /* Inaccessible static: GL_NV_half_float */ /* Inaccessible static: GL_NV_light_max_exponent */ /* Inaccessible static: GL_NV_multisample_filter_hint */ /* Inaccessible static: GL_NV_occlusion_query */ /* Inaccessible static: GL_NV_packed_depth_stencil */ /* Inaccessible static: GL_NV_pixel_data_range */ /* Inaccessible static: GL_NV_point_sprite */ /* Inaccessible static: GL_NV_primitive_restart */ /* Inaccessible static: GL_NV_register_combiners */ /* Inaccessible static: GL_NV_register_combiners2 */ /* Inaccessible static: GL_NV_texgen_reflection */ /* Inaccessible static: GL_NV_texture_compression_vtc */ /* Inaccessible static: GL_NV_texture_env_combine4 */ /* Inaccessible static: GL_NV_texture_expand_normal */ /* Inaccessible static: GL_NV_texture_rectangle */ /* Inaccessible static: GL_NV_texture_shader */ /* Inaccessible static: GL_NV_texture_shader2 */ /* Inaccessible static: GL_NV_texture_shader3 */ /* Inaccessible static: GL_NV_vertex_array_range */ /* Inaccessible static: GL_NV_vertex_array_range2 */ /* Inaccessible static: GL_NV_vertex_program */ /* Inaccessible static: GL_NV_vertex_program1_1 */ /* Inaccessible static: GL_NV_vertex_program2 */ /* Inaccessible static: OpenGL11 */ /* Inaccessible static: OpenGL12 */ /* Inaccessible static: OpenGL13 */ /* Inaccessible static: OpenGL14 */ /* Inaccessible static: OpenGL15 */ /* Inaccessible static: class_000240 */ /* Inaccessible static: class_000241 */ /* * Class: org_lwjgl_opengl_GLContext * Method: init * Signature: (Ljava/util/Set;)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GLContext_init (JNIEnv *, jclass, jobject); /* * Class: org_lwjgl_opengl_GLContext * Method: reinit * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_reinit (JNIEnv *, jclass, jint); #ifdef __cplusplus } #endif #endif Index: extgl.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- extgl.h 15 Feb 2004 19:24:02 -0000 1.26 +++ extgl.h 23 Feb 2004 23:42:56 -0000 1.27 @@ -3278,13 +3278,13 @@ bool extgl_Initialize(JNIEnv *env, jobject gl_extensions); bool extgl_Open(void); #ifdef _WIN32 -void extgl_InitWGL(JNIEnv *env, jobject ext_set); +void extgl_InitWGL(JNIEnv *env); #endif #ifdef _X11 -bool extgl_InitGLX(JNIEnv *env, jobject ext_set, Display *disp, int screen); +bool extgl_InitGLX(JNIEnv *env, Display *disp, int screen); #endif #ifdef _AGL -bool extgl_InitAGL(JNIEnv *env, jobject ext_set); +bool extgl_InitAGL(JNIEnv *env); #endif void *extgl_GetProcAddress(const char *name); void extgl_Close(void); @@ -3294,7 +3294,9 @@ extgl_Extensions.x = 0; \ printf("NOTICE: %s disabled because of missing driver symbols\n", #x); \ extgl_error = false; \ - extgl_removeExtension(e, h, #x); \ + if (h != NULL) { \ + extgl_removeExtension(e, h, #x); \ + } \ } #ifdef __cplusplus } Index: org_lwjgl_opengl_Window.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_Window.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- org_lwjgl_opengl_Window.h 18 Feb 2004 17:48:26 -0000 1.11 +++ org_lwjgl_opengl_Window.h 23 Feb 2004 23:42:57 -0000 1.12 @@ -8,7 +8,6 @@ extern "C" { #endif /* Inaccessible static: _00024assertionsDisabled */ -/* Inaccessible static: created */ /* Inaccessible static: x */ /* Inaccessible static: y */ /* Inaccessible static: width */ @@ -18,7 +17,7 @@ /* Inaccessible static: vsync */ /* Inaccessible static: vbo_tracker */ /* Inaccessible static: context */ -/* Inaccessible static: class_00024org_00024lwjgl_00024opengl_00024Window */ +/* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_opengl_Window * Method: nSetTitle @@ -85,11 +84,19 @@ /* * Class: org_lwjgl_opengl_Window + * Method: nMakeCurrent + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nMakeCurrent + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_Window * Method: nCreate - * Signature: (Ljava/lang/String;IIIIZIIIIILjava/util/HashSet;)V + * Signature: (Ljava/lang/String;IIIIZIIIII)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nCreate - (JNIEnv *, jclass, jstring, jint, jint, jint, jint, jboolean, jint, jint, jint, jint, jint, jobject); + (JNIEnv *, jclass, jstring, jint, jint, jint, jint, jboolean, jint, jint, jint, jint, jint); /* * Class: org_lwjgl_opengl_Window @@ -123,14 +130,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nSetVSyncEnabled (JNIEnv *, jclass, jboolean); -/* - * Class: org_lwjgl_opengl_Window - * Method: nMakeCurrent - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nMakeCurrent - (JNIEnv *, jclass); - #ifdef __cplusplus } #endif Index: extgl.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- extgl.cpp 15 Feb 2004 19:24:02 -0000 1.19 +++ extgl.cpp 23 Feb 2004 23:42:57 -0000 1.20 @@ -719,7 +719,7 @@ #endif #ifdef _AGL - CFStringRef str = CFStringCreateWithCStringNoCopy(NULL, name, kCFStringEncodingUTF8, kCFAllocatorNull); + CFStringRef str = CFStringCreateWithCStringNoCopy(NULL, name, kCFStringEncodingUTF8, kCFAllocatorNULL); void *func_pointer = CFBundleGetFunctionPointerForName(opengl_bundle_ref, str); if (func_pointer == NULL) { func_pointer = CFBundleGetFunctionPointerForName(agl_bundle_ref, str); @@ -785,7 +785,9 @@ if (*terminator == ' ' || *terminator == '\0') { - insertExtension(env, ext_set, name); + if (ext_set != NULL) { + insertExtension(env, ext_set, name); + } return true; @@ -806,7 +808,7 @@ #ifdef _WIN32 /** returns true if the extention is available */ -static bool WGLQueryExtension(JNIEnv *env, jobject ext_set, const char *name) +static bool WGLQueryExtension(JNIEnv *env, const char *name) { const GLubyte *extensions; @@ -817,10 +819,10 @@ extensions = (GLubyte*)wglGetExtensionsStringEXT(); else extensions = (GLubyte*)wglGetExtensionsStringARB(wglGetCurrentDC()); - return QueryExtension(env, ext_set, extensions, name); + return QueryExtension(env, NULL, extensions, name); } -static void extgl_InitWGLARBBufferRegion(JNIEnv *env, jobject ext_set) +static void extgl_InitWGLARBBufferRegion(JNIEnv *env) { if (!extgl_Extensions.WGL_ARB_buffer_region) return; @@ -829,10 +831,10 @@ wglSaveBufferRegionARB = (wglSaveBufferRegionARBPROC) extgl_GetProcAddress("wglSaveBufferRegionARB"); wglRestoreBufferRegionARB = (wglRestoreBufferRegionARBPROC) extgl_GetProcAddress("wglRestoreBufferRegionARB"); - EXTGL_SANITY_CHECK(env, ext_set, WGL_ARB_buffer_region); + EXTGL_SANITY_CHECK(env, NULL, WGL_ARB_buffer_region); } -static void extgl_InitWGLARBPbuffer(JNIEnv *env, jobject ext_set) +static void extgl_InitWGLARBPbuffer(JNIEnv *env) { if (!extgl_Extensions.WGL_ARB_pbuffer) return; @@ -841,66 +843,66 @@ wglReleasePbufferDCARB = (wglReleasePbufferDCARBPROC) extgl_GetProcAddress("wglReleasePbufferDCARB"); wglDestroyPbufferARB = (wglDestroyPbufferARBPROC) extgl_GetProcAddress("wglDestroyPbufferARB"); wglQueryPbufferARB = (wglQueryPbufferARBPROC) extgl_GetProcAddress("wglQueryPbufferARB"); - EXTGL_SANITY_CHECK(env, ext_set, WGL_ARB_pbuffer); + EXTGL_SANITY_CHECK(env, NULL, WGL_ARB_pbuffer); } -static void extgl_InitWGLARBPixelFormat(JNIEnv *env, jobject ext_set) +static void extgl_InitWGLARBPixelFormat(JNIEnv *env) { if (!extgl_Extensions.WGL_ARB_pixel_format) return; wglGetPixelFormatAttribivARB = (wglGetPixelFormatAttribivARBPROC) extgl_GetProcAddress("wglGetPixelFormatAttribivARB"); wglGetPixelFormatAttribfvARB = (wglGetPixelFormatAttribfvARBPROC) extgl_GetProcAddress("wglGetPixelFormatAttribfvARB"); wglChoosePixelFormatARB = (wglChoosePixelFormatARBPROC) extgl_GetProcAddress("wglChoosePixelFormatARB"); - EXTGL_SANITY_CHECK(env, ext_set, WGL_ARB_pixel_format); + EXTGL_SANITY_CHECK(env, NULL, WGL_ARB_pixel_format); } -static void extgl_InitWGLARBRenderTexture(JNIEnv *env, jobject ext_set) +static void extgl_InitWGLARBRenderTexture(JNIEnv *env) { if (!extgl_Extensions.WGL_ARB_render_texture) return; wglBindTexImageARB = (wglBindTexImageARBPROC) extgl_GetProcAddress("wglBindTexImageARB"); wglReleaseTexImageARB = (wglReleaseTexImageARBPROC) extgl_GetProcAddress("wglReleaseTexImageARB"); wglSetPbufferAttribARB = (wglSetPbufferAttribARBPROC) extgl_GetProcAddress("wglSetPbufferAttribARB"); - EXTGL_SANITY_CHECK(env, ext_set, WGL_ARB_render_texture); + EXTGL_SANITY_CHECK(env, NULL, WGL_ARB_render_texture); } -static void extgl_InitWGLEXTSwapControl(JNIEnv *env, jobject ext_set) +static void extgl_InitWGLEXTSwapControl(JNIEnv *env) { if (!extgl_Extensions.WGL_EXT_swap_control) return; wglSwapIntervalEXT = (wglSwapIntervalEXTPROC) extgl_GetProcAddress("wglSwapIntervalEXT"); wglGetSwapIntervalEXT = (wglGetSwapIntervalEXTPROC) extgl_GetProcAddress("wglGetSwapIntervalEXT"); - EXTGL_SANITY_CHECK(env, ext_set, WGL_EXT_swap_control); + EXTGL_SANITY_CHECK(env, NULL, WGL_EXT_swap_control); } -static void extgl_InitWGLARBMakeCurrentRead(JNIEnv *env, jobject ext_set) +static void extgl_InitWGLARBMakeCurrentRead(JNIEnv *env) { if (!extgl_Extensions.WGL_ARB_make_current_read) return; wglMakeContextCurrentARB = (wglMakeContextCurrentARBPROC) extgl_GetProcAddress("wglMakeContextCurrentARB"); wglGetCurrentReadDCARB = (wglGetCurrentReadDCARBPROC) extgl_GetProcAddress("wglGetCurrentReadDCARB"); - EXTGL_SANITY_CHECK(env, ext_set, WGL_ARB_make_current_read); + EXTGL_SANITY_CHECK(env, NULL, WGL_ARB_make_current_read); } -static void extgl_InitSupportedWGLExtensions(JNIEnv *env, jobject ext_set) +static void extgl_InitSupportedWGLExtensions(JNIEnv *env) { - extgl_Extensions.WGL_ARB_buffer_region = WGLQueryExtension(env, ext_set, "WGL_ARB_buffer_region"); - extgl_Extensions.WGL_ARB_make_current_read = WGLQueryExtension(env, ext_set, "WGL_ARB_make_current_read"); - extgl_Extensions.WGL_ARB_multisample = WGLQueryExtension(env, ext_set, "WGL_ARB_multisample"); - extgl_Extensions.WGL_ARB_pbuffer = WGLQueryExtension(env, ext_set, "WGL_ARB_pbuffer"); - extgl_Extensions.WGL_ARB_pixel_format = WGLQueryExtension(env, ext_set, "WGL_ARB_pixel_format"); - extgl_Extensions.WGL_ARB_render_texture = WGLQueryExtension(env, ext_set, "WGL_ARB_render_texture"); - extgl_Extensions.WGL_EXT_swap_control = WGLQueryExtension(env, ext_set, "WGL_EXT_swap_control"); - extgl_Extensions.WGL_NV_render_depth_texture = WGLQueryExtension(env, ext_set, "WGL_NV_render_depth_texture"); - extgl_Extensions.WGL_NV_render_texture_rectangle = WGLQueryExtension(env, ext_set, "WGL_NV_render_texture_rectangle"); + 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"); } -void extgl_InitWGL(JNIEnv *env, jobject ext_set) +void extgl_InitWGL(JNIEnv *env) { wglGetExtensionsStringARB = (wglGetExtensionsStringARBPROC) extgl_GetProcAddress("wglGetExtensionsStringARB"); wglGetExtensionsStringEXT = (wglGetExtensionsStringEXTPROC) extgl_GetProcAddress("wglGetExtensionsStringEXT"); @@ -908,14 +910,14 @@ extgl_Extensions.WGL_EXT_extensions_string = wglGetExtensionsStringEXT != NULL; extgl_error = false; - extgl_InitSupportedWGLExtensions(env, ext_set); + extgl_InitSupportedWGLExtensions(env); - extgl_InitWGLARBMakeCurrentRead(env, ext_set); - extgl_InitWGLEXTSwapControl(env, ext_set); - extgl_InitWGLARBRenderTexture(env, ext_set); - extgl_InitWGLARBPixelFormat(env, ext_set); - extgl_InitWGLARBPbuffer(env, ext_set); - extgl_InitWGLARBBufferRegion(env, ext_set); + extgl_InitWGLARBMakeCurrentRead(env); + extgl_InitWGLEXTSwapControl(env); + extgl_InitWGLARBRenderTexture(env); + extgl_InitWGLARBPixelFormat(env); + extgl_InitWGLARBPbuffer(env); + extgl_InitWGLARBBufferRegion(env); } #endif /* WIN32 */ |