You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(1) |
2
(4) |
3
|
4
|
5
|
|
6
|
7
(2) |
8
(3) |
9
(5) |
10
|
11
(4) |
12
|
|
13
(2) |
14
(2) |
15
(2) |
16
(9) |
17
|
18
|
19
|
|
20
|
21
(7) |
22
(4) |
23
(4) |
24
|
25
(10) |
26
|
|
27
(4) |
28
(16) |
29
(14) |
30
(11) |
31
(1) |
|
|
|
From: Brian M. <ma...@us...> - 2005-03-28 14:59:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8823 Modified Files: extilu.c Log Message: removed bogus define Index: extilu.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/extilu.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- extilu.c 28 Mar 2005 14:53:30 -0000 1.4 +++ extilu.c 28 Mar 2005 14:59:22 -0000 1.5 @@ -1,5 +1,4 @@ #include "extilu.h" -#define devILhandle muhko; /* Handle to ilu Library */ #ifdef _WIN32 |
|
From: Brian M. <ma...@us...> - 2005-03-28 14:53:42
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5940 Modified Files: extilu.c extilut.c Log Message: readded ilu/ilut handles - though they're never used. But stops compile errors Index: extilut.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/extilut.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- extilut.c 28 Mar 2005 13:17:27 -0000 1.3 +++ extilut.c 28 Mar 2005 14:53:30 -0000 1.4 @@ -12,7 +12,8 @@ #include <stdlib.h> #include <string.h> // note, we use the IL handle since it's all in one lib -extern const struct mach_header* devILUThandle; +extern const struct mach_header* devILhandle; +static const struct mach_header* devILUThandle; // never actually used, just makes it shut up #endif /** Index: extilu.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/extilu.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- extilu.c 28 Mar 2005 13:17:27 -0000 1.3 +++ extilu.c 28 Mar 2005 14:53:30 -0000 1.4 @@ -1,4 +1,5 @@ #include "extilu.h" +#define devILhandle muhko; /* Handle to ilu Library */ #ifdef _WIN32 @@ -13,6 +14,7 @@ #include <string.h> // note, we use the IL handle since it's all in one lib extern const struct mach_header* devILhandle; +static const struct mach_header* devILUhandle; // never actually used, just makes it shut up #endif /** @@ -21,7 +23,7 @@ */ static void *NativeGetFunctionPointer(const char *function) { #ifdef _WIN32 - return GetProcAddress(devILhandle, function); + return GetProcAddress(devILUhandle, function); #endif #ifdef _X11 return dlsym(devILUhandle, function); @@ -114,4 +116,3 @@ #endif devILUhandle = NULL; } - |
|
From: Brian M. <ma...@us...> - 2005-03-28 13:17:39
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22668 Modified Files: extil.c extilu.c extilut.c Log Message: first stab at one-shot devil initialization on mac Index: extilut.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/extilut.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- extilut.c 25 Mar 2005 10:25:07 -0000 1.2 +++ extilut.c 28 Mar 2005 13:17:27 -0000 1.3 @@ -11,7 +11,8 @@ #include <mach-o/dyld.h> #include <stdlib.h> #include <string.h> -static const struct mach_header* devILUThandle; +// note, we use the IL handle since it's all in one lib +extern const struct mach_header* devILUThandle; #endif /** @@ -31,7 +32,7 @@ return NULL; mac_symbol_name[0] = '_'; strcpy(&(mac_symbol_name[1]), function); - NSSymbol symbol = NSLookupSymbolInImage(devILUThandle, mac_symbol_name, NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); + NSSymbol symbol = NSLookupSymbolInImage(devILhandle, mac_symbol_name, NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); free(mac_symbol_name); if (symbol == NULL) return NULL; Index: extil.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/extil.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- extil.c 25 Mar 2005 10:25:07 -0000 1.5 +++ extil.c 28 Mar 2005 13:17:27 -0000 1.6 @@ -11,7 +11,7 @@ #include <mach-o/dyld.h> #include <stdlib.h> #include <string.h> -static const struct mach_header* devILhandle; +const struct mach_header* devILhandle; #endif /** Index: extilu.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/extilu.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- extilu.c 25 Mar 2005 10:25:07 -0000 1.2 +++ extilu.c 28 Mar 2005 13:17:27 -0000 1.3 @@ -11,7 +11,8 @@ #include <mach-o/dyld.h> #include <stdlib.h> #include <string.h> -static const struct mach_header* devILUhandle; +// note, we use the IL handle since it's all in one lib +extern const struct mach_header* devILhandle; #endif /** @@ -20,7 +21,7 @@ */ static void *NativeGetFunctionPointer(const char *function) { #ifdef _WIN32 - return GetProcAddress(devILUhandle, function); + return GetProcAddress(devILhandle, function); #endif #ifdef _X11 return dlsym(devILUhandle, function); @@ -31,7 +32,7 @@ return NULL; mac_symbol_name[0] = '_'; strcpy(&(mac_symbol_name[1]), function); - NSSymbol symbol = NSLookupSymbolInImage(devILUhandle, mac_symbol_name, NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); + NSSymbol symbol = NSLookupSymbolInImage(devILhandle, mac_symbol_name, NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); free(mac_symbol_name); if (symbol == NULL) return NULL; |
|
From: Brian M. <ma...@us...> - 2005-03-28 13:09:09
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19225/src/java/org/lwjgl/devil Modified Files: IL.java ILU.java ILUT.java Log Message: first stab at one-shot devil initialization on mac Index: ILUT.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil/ILUT.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ILUT.java 28 Mar 2005 12:44:33 -0000 1.9 +++ ILUT.java 28 Mar 2005 13:08:48 -0000 1.10 @@ -133,7 +133,12 @@ if(!IL.isCreated()) { throw new LWJGLException("Cannot create ILUT without having created IL instance"); } - + + // We need to do nothing when running on mac, since all is loaded in IL + if(System.getProperty("os.name").startsWith("Mac")) { + return; + } + String[] ilutPaths = LWJGLUtil.getLibraryPaths(new String[]{ "ILUT", "ILUT.dll", "ILUT", "libILUT.so", @@ -151,14 +156,20 @@ } } - private static native void initNativeStubs() throws LWJGLException; + static native void initNativeStubs() throws LWJGLException; - private static native void resetNativeStubs(Class clazz); + static native void resetNativeStubs(Class clazz); /** * Exit cleanly by calling destroy. */ public static void destroy() { + + // We need to do nothing when running on mac, since all is destroyed in IL + if(System.getProperty("os.name").startsWith("Mac")) { + return; + } + resetNativeStubs(ILUT.class); if (created) { nDestroy(); @@ -177,4 +188,13 @@ * Native method the destroy the ILUT */ protected static native void nDestroy(); + + /** + * Forcefully set created. Used internally by mac platform since + * it loads ilu/ilut in IL and needs to mark them as created + * @param created value to set created to + */ + static void setCreated(boolean created) { + ILUT.created = created; + } } Index: IL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil/IL.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- IL.java 28 Mar 2005 12:44:33 -0000 1.13 +++ IL.java 28 Mar 2005 13:08:33 -0000 1.14 @@ -596,6 +596,16 @@ try { IL.initNativeStubs(); IL.ilInit(); + + // We need to initialize everything in one fell swoop on mac + if(System.getProperty("os.name").startsWith("Mac")) { + ILU.initNativeStubs(); + ILU.setCreated(true); + + ILUT.initNativeStubs(); + ILUT.setCreated(true); + } + created = true; } catch (LWJGLException e) { destroy(); @@ -608,6 +618,18 @@ */ public static void destroy() { resetNativeStubs(IL.class); + + // We need to destroy everything on mac in one go + if(System.getProperty("os.name").startsWith("Mac")) { + ILU.resetNativeStubs(ILU.class); + ILU.nDestroy(); + ILU.setCreated(false); + + ILUT.resetNativeStubs(ILUT.class); + ILUT.nDestroy(); + ILUT.setCreated(false); + } + if (created) { nDestroy(); } Index: ILU.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil/ILU.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ILU.java 28 Mar 2005 12:44:33 -0000 1.9 +++ ILU.java 28 Mar 2005 13:08:33 -0000 1.10 @@ -169,7 +169,12 @@ if(!IL.isCreated()) { throw new LWJGLException("Cannot create ILU without having created IL instance"); } - + + // We need to do nothing when running on mac, since all is loaded in IL + if(System.getProperty("os.name").startsWith("Mac")) { + return; + } + String[] iluPaths = LWJGLUtil.getLibraryPaths(new String[]{ "ILU", "ILU.dll", "ILU", "libILU.so", @@ -187,14 +192,20 @@ } } - private static native void initNativeStubs() throws LWJGLException; + static native void initNativeStubs() throws LWJGLException; - private static native void resetNativeStubs(Class clazz); + static native void resetNativeStubs(Class clazz); /** * Exit cleanly by calling destroy. */ public static void destroy() { + + // We need to do nothing when running on mac, since all is destroyed in IL + if(System.getProperty("os.name").startsWith("Mac")) { + return; + } + resetNativeStubs(ILU.class); if (created) { nDestroy(); @@ -212,5 +223,14 @@ /** * Native method the destroy the ILU */ - protected static native void nDestroy(); + static native void nDestroy(); + + /** + * Forcefully set created. Used internally by mac platform since + * it loads ilu/ilut in IL and needs to mark them as created + * @param created value to set created to + */ + static void setCreated(boolean created) { + ILU.created = created; + } } |
|
From: Brian M. <ma...@us...> - 2005-03-28 12:44:43
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5514/java/org/lwjgl Added Files: LWJGLUtil.java Log Message: reworked detection of native paths to shared implementation in new class LWJGLUtil --- NEW FILE: LWJGLUtil.java --- /* * Copyright (c) 2002-2005 LWJGL 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 'LWJGL' 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; import org.lwjgl.LWJGLException; import org.lwjgl.Sys; import java.io.File; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; /** * $Id: LWJGLUtil.java,v 1.1 2005/03/28 12:44:32 matzon Exp $ * <p> * Internal library methods * </p> * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class LWJGLUtil { /** * Locates the paths required by a library. * * @param libNames List of library names to look for, in the form of Local Library name, Platform library name. * At least 6 names must be passed. 2 for each supported platform in the following order: Windows, Linux, MacOSX. * @param classloader The classloader to ask for librariy paths * @return Paths to located libraries, if any */ public static String[] getLibraryPaths(String[] libNames, ClassLoader classloader) throws LWJGLException { // need to pass path of possible locations of IL to native side List possible_paths = new ArrayList(); String osName = System.getProperty("os.name"); String libname; String platform_lib_name; if (osName.startsWith("Win")) { libname = libNames[0]; platform_lib_name = libNames[1]; } else if (osName.startsWith("Lin")) { libname = libNames[2]; platform_lib_name = libNames[3]; } else if (osName.startsWith("Mac")) { libname = libNames[4]; platform_lib_name = libNames[5]; } else { throw new LWJGLException("Unknown platform: " + osName); } // Add all possible paths from java.library.path StringTokenizer st = new StringTokenizer(System.getProperty("java.library.path"), File.pathSeparator); while (st.hasMoreTokens()) { String path = st.nextToken(); possible_paths.add(path + File.separator + platform_lib_name); } String classloader_path = LWJGLUtil.getPathFromClassLoader(libname, classloader); if (classloader_path != null) { Sys.log("getPathFromClassLoader: Path found: " + classloader_path); possible_paths.add(classloader_path); } String lwjgl_classloader_path = LWJGLUtil.getPathFromClassLoader("lwjgl", classloader); if (lwjgl_classloader_path != null) { Sys.log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); possible_paths.add(lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) + File.separator + platform_lib_name); } //add cwd path possible_paths.add(platform_lib_name); //create needed string array String[] paths = new String[possible_paths.size()]; possible_paths.toArray(paths); return paths; } /** * Tries to locate named library from the current ClassLoader * This method exists because native libraries are loaded from native code, and as such * is exempt from ClassLoader library loading rutines. It therefore always fails. * We therefore invoke the protected method of the ClassLoader to see if it can * locate it. * * @param libname Name of library to search for * @param classloader Classloader to use * @return Absolute path to library if found, otherwise null */ public static String getPathFromClassLoader(String libname, ClassLoader classloader) { try { Sys.log("getPathFromClassLoader: searching for: " + libname); Object o = classloader; Class c = o.getClass(); while (c != null) { try { Method findLibrary = c.getDeclaredMethod("findLibrary", new Class[] { String.class}); findLibrary.setAccessible(true); Object[] arguments = new Object[] {libname}; return (String) findLibrary.invoke(o, arguments); } catch (NoSuchMethodException e) { c = c.getSuperclass(); } } } catch (Exception e) { Sys.log("Failure locating " + e + " using classloader:" + e); } return null; } } |
|
From: Brian M. <ma...@us...> - 2005-03-28 12:44:42
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5514/java/org/lwjgl/devil Modified Files: IL.java ILU.java ILUT.java Log Message: reworked detection of native paths to shared implementation in new class LWJGLUtil Index: ILUT.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil/ILUT.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ILUT.java 27 Mar 2005 19:48:47 -0000 1.8 +++ ILUT.java 28 Mar 2005 12:44:33 -0000 1.9 @@ -41,6 +41,7 @@ import org.lwjgl.LWJGLException; import org.lwjgl.Sys; +import org.lwjgl.LWJGLUtil; /** * $Id$ @@ -133,7 +134,10 @@ throw new LWJGLException("Cannot create ILUT without having created IL instance"); } - String[] ilutPaths = getILUTPaths(); + String[] ilutPaths = LWJGLUtil.getLibraryPaths(new String[]{ + "ILUT", "ILUT.dll", + "ILUT", "libILUT.so", + "ILUT", "IL"}, ILU.class.getClassLoader()); nCreate(ilutPaths); created = true; @@ -173,85 +177,4 @@ * Native method the destroy the ILUT */ protected static native void nDestroy(); - - private static String[] getILUTPaths() throws LWJGLException { - // need to pass path of possible locations of IL to native side - List possible_paths = new ArrayList(); - - String osName = System.getProperty("os.name"); - - String libname; - String platform_lib_name; - if (osName.startsWith("Win")) { - libname = "ILUT"; - platform_lib_name = "ILUT.dll"; - } else if (osName.startsWith("Lin")) { - libname = "ILUT"; - platform_lib_name = "libILUT.so"; - } else if (osName.startsWith("Mac")) { - libname = "ILUT"; - platform_lib_name = "libILUT.dylib"; - } else { - throw new LWJGLException("Unknown platform: " + osName); - } - - // Add all possible paths from java.library.path - StringTokenizer st = new StringTokenizer(System.getProperty("java.library.path"), File.pathSeparator); - while (st.hasMoreTokens()) { - String path = st.nextToken(); - possible_paths.add(path + File.separator + platform_lib_name); - } - - String classloader_path = getPathFromClassLoader(libname); - if (classloader_path != null) { - Sys.log("getPathFromClassLoader: Path found: " + classloader_path); - possible_paths.add(classloader_path); - } - String lwjgl_classloader_path = getPathFromClassLoader("lwjgl"); - if (lwjgl_classloader_path != null) { - Sys.log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); - possible_paths.add(lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) - + File.separator + platform_lib_name); - } - - //add cwd path - possible_paths.add(platform_lib_name); - - //create needed string array - String[] ilutPaths = new String[possible_paths.size()]; - possible_paths.toArray(ilutPaths); - - return ilutPaths; - } - - /** - * Tries to locate ILUT from the current ClassLoader - * This method exists because ILUT is loaded from native code, and as such - * is exempt from ClassLoader library loading rutines. ILUT therefore always fails. - * We therefore invoke the protected method of the 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 getPathFromClassLoader(String libname) { - try { - Sys.log("getPathFromClassLoader: searching for: " + libname); - Object o = ILUT.class.getClassLoader(); - Class c = o.getClass(); - while (c != null) { - try { - Method findLibrary = c.getDeclaredMethod("findLibrary", new Class[] { String.class}); - findLibrary.setAccessible(true); - Object[] arguments = new Object[] { libname}; - return (String) findLibrary.invoke(o, arguments); - } catch (NoSuchMethodException e) { - c = c.getSuperclass(); - } - } - } catch (Exception e) { - Sys.log("Failure locating ILUT using classloader:" + e); - } - return null; - } } Index: IL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil/IL.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- IL.java 28 Mar 2005 10:07:30 -0000 1.12 +++ IL.java 28 Mar 2005 12:44:33 -0000 1.13 @@ -47,6 +47,7 @@ import org.lwjgl.BufferChecks; import org.lwjgl.LWJGLException; import org.lwjgl.Sys; +import org.lwjgl.LWJGLUtil; /** * $Id$ @@ -585,7 +586,10 @@ return; } - String[] illPaths = getILPaths(); + String[] illPaths = LWJGLUtil.getLibraryPaths(new String[]{ + "DevIL", "DevIL.dll", + "IL", "libIL.so", + "IL", "IL"}, IL.class.getClassLoader()); nCreate(illPaths); created = true; @@ -621,85 +625,4 @@ * Native method the destroy the IL */ protected static native void nDestroy(); - - private static String[] getILPaths() throws LWJGLException { - // need to pass path of possible locations of IL to native side - List possible_paths = new ArrayList(); - - String osName = System.getProperty("os.name"); - - String libname; - String platform_lib_name; - if (osName.startsWith("Win")) { - libname = "DevIL"; - platform_lib_name = "DevIL.dll"; - } else if (osName.startsWith("Lin")) { - libname = "DevIL"; - platform_lib_name = "libIL.so"; - } else if (osName.startsWith("Mac")) { - libname = "DevIL"; - platform_lib_name = "libIL.dylib"; - } else { - throw new LWJGLException("Unknown platform: " + osName); - } - - // Add all possible paths from java.library.path - StringTokenizer st = new StringTokenizer(System.getProperty("java.library.path"), File.pathSeparator); - while (st.hasMoreTokens()) { - String path = st.nextToken(); - possible_paths.add(path + File.separator + platform_lib_name); - } - - String classloader_path = getPathFromClassLoader(libname); - if (classloader_path != null) { - Sys.log("getPathFromClassLoader: Path found: " + classloader_path); - possible_paths.add(classloader_path); - } - String lwjgl_classloader_path = getPathFromClassLoader("lwjgl"); - if (lwjgl_classloader_path != null) { - Sys.log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); - possible_paths.add(lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) - + File.separator + platform_lib_name); - } - - //add cwd path - possible_paths.add(platform_lib_name); - - //create needed string array - String[] ilPaths = new String[possible_paths.size()]; - possible_paths.toArray(ilPaths); - - return ilPaths; - } - - /** - * Tries to locate Devil from the current ClassLoader - * This method exists because Devil is loaded from native code, and as such - * is exempt from ClassLoader library loading rutines. Devil therefore always fails. - * We therefore invoke the protected method of the 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 getPathFromClassLoader(String libname) { - try { - Sys.log("getPathFromClassLoader: searching for: " + libname); - Object o = IL.class.getClassLoader(); - Class c = o.getClass(); - while (c != null) { - try { - Method findLibrary = c.getDeclaredMethod("findLibrary", new Class[] { String.class}); - findLibrary.setAccessible(true); - Object[] arguments = new Object[] { libname}; - return (String) findLibrary.invoke(o, arguments); - } catch (NoSuchMethodException e) { - c = c.getSuperclass(); - } - } - } catch (Exception e) { - Sys.log("Failure locating DevIL using classloader:" + e); - } - return null; - } } Index: ILU.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil/ILU.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ILU.java 27 Mar 2005 19:48:47 -0000 1.8 +++ ILU.java 28 Mar 2005 12:44:33 -0000 1.9 @@ -41,6 +41,8 @@ import org.lwjgl.BufferChecks; import org.lwjgl.LWJGLException; import org.lwjgl.Sys; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.LWJGLUtil; /** * $Id$ @@ -168,7 +170,10 @@ throw new LWJGLException("Cannot create ILU without having created IL instance"); } - String[] iluPaths = getILUPaths(); + String[] iluPaths = LWJGLUtil.getLibraryPaths(new String[]{ + "ILU", "ILU.dll", + "ILU", "libILU.so", + "ILU", "ILU"}, ILU.class.getClassLoader()); nCreate(iluPaths); created = true; @@ -208,85 +213,4 @@ * Native method the destroy the ILU */ protected static native void nDestroy(); - - private static String[] getILUPaths() throws LWJGLException { - // need to pass path of possible locations of ILU to native side - List possible_paths = new ArrayList(); - - String osName = System.getProperty("os.name"); - - String libname; - String platform_lib_name; - if (osName.startsWith("Win")) { - libname = "ILU"; - platform_lib_name = "ILU.dll"; - } else if (osName.startsWith("Lin")) { - libname = "ILU"; - platform_lib_name = "libILU.so"; - } else if (osName.startsWith("Mac")) { - libname = "ILU"; - platform_lib_name = "libILU.dylib"; - } else { - throw new LWJGLException("Unknown platform: " + osName); - } - - // Add all possible paths from java.library.path - StringTokenizer st = new StringTokenizer(System.getProperty("java.library.path"), File.pathSeparator); - while (st.hasMoreTokens()) { - String path = st.nextToken(); - possible_paths.add(path + File.separator + platform_lib_name); - } - - String classloader_path = getPathFromClassLoader(libname); - if (classloader_path != null) { - Sys.log("getPathFromClassLoader: Path found: " + classloader_path); - possible_paths.add(classloader_path); - } - String lwjgl_classloader_path = getPathFromClassLoader("lwjgl"); - if (lwjgl_classloader_path != null) { - Sys.log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); - possible_paths.add(lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) - + File.separator + platform_lib_name); - } - - //add cwd path - possible_paths.add(platform_lib_name); - - //create needed string array - String[] iluPaths = new String[possible_paths.size()]; - possible_paths.toArray(iluPaths); - - return iluPaths; - } - - /** - * Tries to locate ILU from the current ClassLoader - * This method exists because ILU is loaded from native code, and as such - * is exempt from ClassLoader library loading rutines. ILU therefore always fails. - * We therefore invoke the protected method of the 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 getPathFromClassLoader(String libname) { - try { - Sys.log("getPathFromClassLoader: searching for: " + libname); - Object o = ILU.class.getClassLoader(); - Class c = o.getClass(); - while (c != null) { - try { - Method findLibrary = c.getDeclaredMethod("findLibrary", new Class[] { String.class}); - findLibrary.setAccessible(true); - Object[] arguments = new Object[] { libname}; - return (String) findLibrary.invoke(o, arguments); - } catch (NoSuchMethodException e) { - c = c.getSuperclass(); - } - } - } catch (Exception e) { - Sys.log("Failure locating ILU using classloader:" + e); - } - return null; - } } |
|
From: Brian M. <ma...@us...> - 2005-03-28 12:44:42
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5514/java/org/lwjgl/openal Modified Files: AL.java Log Message: reworked detection of native paths to shared implementation in new class LWJGLUtil Index: AL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- AL.java 9 Mar 2005 13:28:16 -0000 1.38 +++ AL.java 28 Mar 2005 12:44:33 -0000 1.39 @@ -40,6 +40,9 @@ import org.lwjgl.LWJGLException; import org.lwjgl.Sys; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.devil.ILU; +import org.lwjgl.LWJGLUtil; /** * $Id$ @@ -131,56 +134,6 @@ create(); } - private static String[] getOALPaths() throws LWJGLException { - // need to pass path of possible locations of OAL to native side - List possible_paths = new ArrayList(); - - String osName = System.getProperty("os.name"); - - String libname; - String platform_lib_name; - if (osName.startsWith("Win")) { - libname = "lwjglaudio"; - platform_lib_name = "lwjglaudio.dll"; - } else if (osName.startsWith("Lin")) { - libname = "openal"; - platform_lib_name = "libopenal.so"; - } else if (osName.startsWith("Mac")) { - libname = "openal"; - platform_lib_name = "openal.dylib"; - } else { - throw new LWJGLException("Unknown platform: "+osName); - } - - // Add all possible paths from java.library.path - String java_library_path = System.getProperty("java.library.path"); - StringTokenizer st = new StringTokenizer(System.getProperty("java.library.path"), File.pathSeparator); - while (st.hasMoreTokens()) { - String path = st.nextToken(); - possible_paths.add(path + File.separator + platform_lib_name); - } - - String classloader_path = getPathFromClassLoader(libname); - if (classloader_path != null) { - Sys.log("getPathFromClassLoader: Path found: " + classloader_path); - possible_paths.add(classloader_path); - } - String lwjgl_classloader_path = getPathFromClassLoader("lwjgl"); - if (lwjgl_classloader_path != null) { - Sys.log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); - possible_paths.add(lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) - + File.separator + platform_lib_name); - } - - //add cwd path - possible_paths.add(platform_lib_name); - //create needed string array - String[] oalPaths = new String[possible_paths.size()]; - possible_paths.toArray(oalPaths); - - return oalPaths; - } - /** * Creates an OpenAL instance. The empty create will cause OpenAL to * open the default device, and create a context using default values. @@ -189,7 +142,10 @@ if (created) { return; } - String[] oalPaths = getOALPaths(); + String[] oalPaths = LWJGLUtil.getLibraryPaths(new String[]{ + "lwjglaudio", "lwjglaudio.dll", + "openal", "openal.so", + "openal", "openal.dylib"}, AL.class.getClassLoader()); nCreate(oalPaths); created = true; @@ -240,37 +196,6 @@ nDestroy(); created = false; } - - /** - * Tries to locate OpenAL from the current ClassLoader - * This method exists because OpenAL is loaded from native code, and as such - * is exempt from ClassLoader library loading rutines. OpenAL therefore always fails. - * We therefore invoke the protected method of the 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 getPathFromClassLoader(String libname) { - try { - Sys.log("getPathFromClassLoader: searching for: " + libname); - Object o = AL.class.getClassLoader(); - Class c = o.getClass(); - while (c != null) { - try { - Method findLibrary = c.getDeclaredMethod("findLibrary", new Class[] { String.class }); - findLibrary.setAccessible(true); - Object[] arguments = new Object[] { libname }; - return (String)findLibrary.invoke(o, arguments); - } catch (NoSuchMethodException e) { - c = c.getSuperclass(); - } - } - } catch (Exception e) { - Sys.log("Failure locating OpenAL using classloader:" + e); - } - return null; - } private static native void resetNativeStubs(Class clazz); |
|
From: Brian M. <ma...@us...> - 2005-03-28 11:05:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17540 Modified Files: org_lwjgl_devil_IL.c org_lwjgl_devil_ILU.c Log Message: fixed warnings\nremoved cruft Index: org_lwjgl_devil_IL.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/org_lwjgl_devil_IL.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- org_lwjgl_devil_IL.c 28 Mar 2005 10:06:06 -0000 1.18 +++ org_lwjgl_devil_IL.c 28 Mar 2005 11:04:46 -0000 1.19 @@ -28,24 +28,21 @@ typedef ILboolean (ILAPIENTRY *ilGetBooleanPROC) (ILenum Mode); typedef ILvoid (ILAPIENTRY *ilGetBooleanvPROC) (ILenum Mode, ILboolean *Param); typedef ILubyte* (ILAPIENTRY *ilGetDataPROC) (ILvoid); -typedef ILuint (ILAPIENTRY *ilGetDXTCDataPROC) (ILvoid *Buffer, ILuint BufferSize, ILenum DXTCFormat); typedef ILenum (ILAPIENTRY *ilGetErrorPROC) (ILvoid); typedef ILint (ILAPIENTRY *ilGetIntegerPROC) (ILenum Mode); typedef ILvoid (ILAPIENTRY *ilGetIntegervPROC) (ILenum Mode, ILint *Param); typedef ILuint (ILAPIENTRY *ilGetLumpPosPROC) (ILvoid); typedef ILubyte* (ILAPIENTRY *ilGetPalettePROC) (ILvoid); -typedef const ILstring (ILAPIENTRY *ilGetStringPROC) (ILenum StringName); +typedef const ILstring (ILAPIENTRY *ilGetStringPROC) (ILenum StringName); typedef ILvoid (ILAPIENTRY *ilHintPROC) (ILenum Target, ILenum Mode); typedef ILvoid (ILAPIENTRY *ilInitPROC) (ILvoid); typedef ILboolean (ILAPIENTRY *ilIsDisabledPROC) (ILenum Mode); typedef ILboolean (ILAPIENTRY *ilIsEnabledPROC) (ILenum Mode); typedef ILboolean (ILAPIENTRY *ilIsImagePROC) (ILuint Image); typedef ILboolean (ILAPIENTRY *ilIsValidPROC) (ILenum Type, const ILstring FileName); -typedef ILboolean (ILAPIENTRY *ilIsValidFPROC) (ILenum Type, ILHANDLE File); typedef ILboolean (ILAPIENTRY *ilIsValidLPROC) (ILenum Type, ILvoid *Lump, ILuint Size); typedef ILvoid (ILAPIENTRY *ilKeyColourPROC) (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha); typedef ILboolean (ILAPIENTRY *ilLoadPROC) (ILenum Type, const ILstring FileName); -typedef ILboolean (ILAPIENTRY *ilLoadFPROC) (ILenum Type, ILHANDLE File); typedef ILboolean (ILAPIENTRY *ilLoadImagePROC) (const ILstring FileName); typedef ILboolean (ILAPIENTRY *ilLoadLPROC) (ILenum Type, ILvoid *Lump, ILuint Size); typedef ILboolean (ILAPIENTRY *ilLoadPalPROC) (const ILstring FileName); @@ -53,32 +50,20 @@ typedef ILboolean (ILAPIENTRY *ilOverlayImagePROC) (ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord); typedef ILvoid (ILAPIENTRY *ilPopAttribPROC) (ILvoid); typedef ILvoid (ILAPIENTRY *ilPushAttribPROC) (ILuint Bits); -typedef ILvoid (ILAPIENTRY *ilRegisterFormatPROC) (ILenum Format); -typedef ILboolean (ILAPIENTRY *ilRegisterLoadPROC) (const ILstring Ext, IL_LOADPROC Load); -typedef ILboolean (ILAPIENTRY *ilRegisterMipNumPROC) (ILuint Num); -typedef ILboolean (ILAPIENTRY *ilRegisterNumImagesPROC) (ILuint Num); -typedef ILvoid (ILAPIENTRY *ilRegisterOriginPROC) (ILenum Origin); -typedef ILvoid (ILAPIENTRY *ilRegisterPalPROC) (ILvoid *Pal, ILuint Size, ILenum Type); -typedef ILboolean (ILAPIENTRY *ilRegisterSavePROC) (const ILstring Ext, IL_SAVEPROC Save); -typedef ILvoid (ILAPIENTRY *ilRegisterTypePROC) (ILenum Type); typedef ILboolean (ILAPIENTRY *ilRemoveLoadPROC) (const ILstring Ext); typedef ILboolean (ILAPIENTRY *ilRemoveSavePROC) (const ILstring Ext); typedef ILvoid (ILAPIENTRY *ilResetMemoryPROC) (ILvoid); typedef ILvoid (ILAPIENTRY *ilResetReadPROC) (ILvoid); typedef ILvoid (ILAPIENTRY *ilResetWritePROC) (ILvoid); typedef ILboolean (ILAPIENTRY *ilSavePROC) (ILenum Type, const ILstring FileName); -typedef ILuint (ILAPIENTRY *ilSaveFPROC) (ILenum Type, ILHANDLE File); typedef ILboolean (ILAPIENTRY *ilSaveImagePROC) (const ILstring FileName); typedef ILuint (ILAPIENTRY *ilSaveLPROC) (ILenum Type, ILvoid *Lump, ILuint Size); typedef ILboolean (ILAPIENTRY *ilSavePalPROC) (const ILstring FileName); typedef ILboolean (ILAPIENTRY *ilSetDataPROC) (ILvoid *Data); typedef ILboolean (ILAPIENTRY *ilSetDurationPROC) (ILuint Duration); typedef ILvoid (ILAPIENTRY *ilSetIntegerPROC) (ILenum Mode, ILint Param); -typedef ILvoid (ILAPIENTRY *ilSetMemoryPROC) (mAlloc AllocFunc, mFree FreeFunc); typedef ILvoid (ILAPIENTRY *ilSetPixelsPROC) (ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, ILvoid *Data); -typedef ILvoid (ILAPIENTRY *ilSetReadPROC) (fOpenRProc Open, fCloseRProc Close, fEofProc Eof, fGetcProc Getc, fReadProc Read, fSeekRProc Seek, fTellRProc Tell); typedef ILvoid (ILAPIENTRY *ilSetStringPROC) (ILenum Mode, const char *String); -typedef ILvoid (ILAPIENTRY *ilSetWritePROC) (fOpenWProc Open, fCloseWProc Close, fPutcProc Putc, fSeekWProc Seek, fTellWProc Tell, fWriteProc Write); typedef ILvoid (ILAPIENTRY *ilShutDownPROC) (ILvoid); typedef ILboolean (ILAPIENTRY *ilTexImagePROC) (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, ILvoid *Data); typedef ILboolean (ILAPIENTRY *ilTypeFuncPROC) (ILenum Mode); @@ -87,6 +72,24 @@ typedef ILboolean (ILAPIENTRY *ilLoadDataLPROC) (ILvoid *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp); typedef ILboolean (ILAPIENTRY *ilSaveDataPROC) (const ILstring FileName); +// not bound +//typedef ILuint (ILAPIENTRY *ilGetDXTCDataPROC) (ILvoid *Buffer, ILuint BufferSize, ILenum DXTCFormat); +//typedef ILboolean (ILAPIENTRY *ilIsValidFPROC) (ILenum Type, ILHANDLE File); +//typedef ILboolean (ILAPIENTRY *ilLoadFPROC) (ILenum Type, ILHANDLE File); +//typedef ILvoid (ILAPIENTRY *ilRegisterFormatPROC) (ILenum Format); +//typedef ILboolean (ILAPIENTRY *ilRegisterLoadPROC) (const ILstring Ext, IL_LOADPROC Load); +//typedef ILboolean (ILAPIENTRY *ilRegisterMipNumPROC) (ILuint Num); +//typedef ILboolean (ILAPIENTRY *ilRegisterNumImagesPROC) (ILuint Num); +//typedef ILvoid (ILAPIENTRY *ilRegisterOriginPROC) (ILenum Origin); +//typedef ILvoid (ILAPIENTRY *ilRegisterPalPROC) (ILvoid *Pal, ILuint Size, ILenum Type); +//typedef ILboolean (ILAPIENTRY *ilRegisterSavePROC) (const ILstring Ext, IL_SAVEPROC Save); +//typedef ILvoid (ILAPIENTRY *ilRegisterTypePROC) (ILenum Type); +//typedef ILuint (ILAPIENTRY *ilSaveFPROC) (ILenum Type, ILHANDLE File); +//typedef ILvoid (ILAPIENTRY *ilSetMemoryPROC) (mAlloc AllocFunc, mFree FreeFunc); +//typedef ILvoid (ILAPIENTRY *ilSetReadPROC) (fOpenRProc Open, fCloseRProc Close, fEofProc Eof, fGetcProc Getc, fReadProc Read, fSeekRProc Seek, fTellRProc Tell); +//typedef ILvoid (ILAPIENTRY *ilSetWritePROC) (fOpenWProc Open, fCloseWProc Close, fPutcProc Putc, fSeekWProc Seek, fTellWProc Tell, fWriteProc Write); + + static ilActiveImagePROC ilActiveImage; static ilActiveLayerPROC ilActiveLayer; static ilActiveMipmapPROC ilActiveMipmap; @@ -115,7 +118,6 @@ static ilGetBooleanPROC ilGetBoolean; static ilGetBooleanvPROC ilGetBooleanv; static ilGetDataPROC ilGetData; -static ilGetDXTCDataPROC ilGetDXTCData; static ilGetErrorPROC ilGetError; static ilGetIntegerPROC ilGetInteger; static ilGetIntegervPROC ilGetIntegerv; @@ -128,11 +130,9 @@ static ilIsEnabledPROC ilIsEnabled; static ilIsImagePROC ilIsImage; static ilIsValidPROC ilIsValid; -static ilIsValidFPROC ilIsValidF; static ilIsValidLPROC ilIsValidL; static ilKeyColourPROC ilKeyColour; static ilLoadPROC ilLoad; -static ilLoadFPROC ilLoadF; static ilLoadImagePROC ilLoadImage; static ilLoadLPROC ilLoadL; static ilLoadPalPROC ilLoadPal; @@ -140,40 +140,45 @@ static ilOverlayImagePROC ilOverlayImage; static ilPopAttribPROC ilPopAttrib; static ilPushAttribPROC ilPushAttrib; -static ilRegisterFormatPROC ilRegisterFormat; -static ilRegisterLoadPROC ilRegisterLoad; -static ilRegisterMipNumPROC ilRegisterMipNum; -static ilRegisterNumImagesPROC ilRegisterNumImages; -static ilRegisterOriginPROC ilRegisterOrigin; -static ilRegisterPalPROC ilRegisterPal; -static ilRegisterSavePROC ilRegisterSave; -static ilRegisterTypePROC ilRegisterType; static ilRemoveLoadPROC ilRemoveLoad; static ilRemoveSavePROC ilRemoveSave; static ilResetMemoryPROC ilResetMemory; static ilResetReadPROC ilResetRead; static ilResetWritePROC ilResetWrite; static ilSavePROC ilSave; -static ilSaveFPROC ilSaveF; static ilSaveImagePROC ilSaveImage; static ilSaveLPROC ilSaveL; static ilSavePalPROC ilSavePal; static ilSetDataPROC ilSetData; static ilSetDurationPROC ilSetDuration; static ilSetIntegerPROC ilSetInteger; -static ilSetMemoryPROC ilSetMemory; static ilSetPixelsPROC ilSetPixels; -static ilSetReadPROC ilSetRead; static ilSetStringPROC ilSetString; -static ilSetWritePROC ilSetWrite; static ilShutDownPROC ilShutDown; static ilTexImagePROC ilTexImage; static ilTypeFuncPROC ilTypeFunc; static ilLoadDataPROC ilLoadData; -static ilLoadDataFPROC ilLoadDataF; static ilLoadDataLPROC ilLoadDataL; static ilSaveDataPROC ilSaveData; +// not bound +//static ilGetDXTCDataPROC ilGetDXTCData; +//static ilIsValidFPROC ilIsValidF; +//static ilLoadFPROC ilLoadF; +//static ilRegisterFormatPROC ilRegisterFormat; +//static ilRegisterLoadPROC ilRegisterLoad; +//static ilRegisterMipNumPROC ilRegisterMipNum; +//static ilRegisterNumImagesPROC ilRegisterNumImages; +//static ilRegisterOriginPROC ilRegisterOrigin; +//static ilRegisterPalPROC ilRegisterPal; +//static ilRegisterSavePROC ilRegisterSave; +//static ilRegisterTypePROC ilRegisterType; +//static ilSaveFPROC ilSaveF; +//static ilSetMemoryPROC ilSetMemory; +//static ilSetReadPROC ilSetRead; +//static ilSetWritePROC ilSetWrite; +//static ilLoadDataFPROC ilLoadDataF; + /* * Class: org_lwjgl_devil_IL * Method: ilActiveImage Index: org_lwjgl_devil_ILU.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/org_lwjgl_devil_ILU.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_devil_ILU.c 25 Mar 2005 01:07:27 -0000 1.4 +++ org_lwjgl_devil_ILU.c 28 Mar 2005 11:04:46 -0000 1.5 @@ -16,14 +16,14 @@ typedef ILboolean (ILAPIENTRY *iluEnlargeCanvasPROC) (ILuint Width, ILuint Height, ILuint Depth); typedef ILboolean (ILAPIENTRY *iluEnlargeImagePROC) (ILfloat XDim, ILfloat YDim, ILfloat ZDim); typedef ILboolean (ILAPIENTRY *iluEqualizePROC) (ILvoid); -typedef const ILstring (ILAPIENTRY *iluErrorStringPROC) (ILenum Error); +typedef const ILstring (ILAPIENTRY *iluErrorStringPROC) (ILenum Error); typedef ILboolean (ILAPIENTRY *iluFlipImagePROC) (ILvoid); typedef ILboolean (ILAPIENTRY *iluGammaCorrectPROC) (ILfloat Gamma); typedef ILuint (ILAPIENTRY *iluGenImagePROC) (ILvoid); typedef ILvoid (ILAPIENTRY *iluGetImageInfoPROC) (ILinfo *Info); typedef ILint (ILAPIENTRY *iluGetIntegerPROC) (ILenum Mode); typedef ILvoid (ILAPIENTRY *iluGetIntegervPROC) (ILenum Mode, ILint *Param); -typedef const ILstring (ILAPIENTRY *iluGetStringPROC) (ILenum StringName); +typedef const ILstring (ILAPIENTRY *iluGetStringPROC) (ILenum StringName); typedef ILvoid (ILAPIENTRY *iluImageParameterPROC) (ILenum PName, ILenum Param); typedef ILvoid (ILAPIENTRY *iluInitPROC) (ILvoid); typedef ILboolean (ILAPIENTRY *iluInvertAlphaPROC) (ILvoid); @@ -32,11 +32,8 @@ typedef ILboolean (ILAPIENTRY *iluNegativePROC) (ILvoid); typedef ILboolean (ILAPIENTRY *iluNoisifyPROC) (ILclampf Tolerance); typedef ILboolean (ILAPIENTRY *iluPixelizePROC) (ILuint PixSize); -typedef ILvoid (ILAPIENTRY *iluRegionfvPROC) (ILpointf *Points, ILuint n); -typedef ILvoid (ILAPIENTRY *iluRegionivPROC) (ILpointi *Points, ILuint n); typedef ILboolean (ILAPIENTRY *iluReplaceColourPROC) (ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance); typedef ILboolean (ILAPIENTRY *iluRotatePROC) (ILfloat Angle); -typedef ILboolean (ILAPIENTRY *iluRotate3DPROC) (ILfloat x, ILfloat y, ILfloat z, ILfloat Angle); typedef ILboolean (ILAPIENTRY *iluSaturate1fPROC) (ILfloat Saturation); typedef ILboolean (ILAPIENTRY *iluSaturate4fPROC) (ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation); typedef ILboolean (ILAPIENTRY *iluScalePROC) (ILuint Width, ILuint Height, ILuint Depth); @@ -45,6 +42,11 @@ typedef ILboolean (ILAPIENTRY *iluSwapColoursPROC) (ILvoid); typedef ILboolean (ILAPIENTRY *iluWavePROC) (ILfloat Angle); +// not bound +//typedef ILvoid (ILAPIENTRY *iluRegionfvPROC) (ILpointf *Points, ILuint n); +//typedef ILvoid (ILAPIENTRY *iluRegionivPROC) (ILpointi *Points, ILuint n); +//typedef ILboolean (ILAPIENTRY *iluRotate3DPROC) (ILfloat x, ILfloat y, ILfloat z, ILfloat Angle); + static iluAlienifyPROC iluAlienify; static iluBlurAvgPROC iluBlurAvg; static iluBlurGaussianPROC iluBlurGaussian; @@ -77,11 +79,8 @@ static iluNegativePROC iluNegative; static iluNoisifyPROC iluNoisify; static iluPixelizePROC iluPixelize; -static iluRegionfvPROC iluRegionfv; -static iluRegionivPROC iluRegioniv; static iluReplaceColourPROC iluReplaceColour; static iluRotatePROC iluRotate; -static iluRotate3DPROC iluRotate3D; static iluSaturate1fPROC iluSaturate1f; static iluSaturate4fPROC iluSaturate4f; static iluScalePROC iluScale; @@ -90,6 +89,11 @@ static iluSwapColoursPROC iluSwapColours; static iluWavePROC iluWave; +// not bound +//static iluRegionfvPROC iluRegionfv; +//static iluRegionivPROC iluRegioniv; +//static iluRotate3DPROC iluRotate3D; + /* * Class: org_lwjgl_devil_ILU * Method: iluAlienify @@ -442,59 +446,6 @@ /* * Class: org_lwjgl_devil_ILU - * Method: iluRegionfv - * Signature: ([Lorg/lwjgl/devil/ILpointf;I)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_iluRegionfv(JNIEnv *env, jclass clazz, jobjectArray points, jint n) { - /*jfieldID fieldId; - jmethodID methodId; - jobject element; - int i; - ILpointf *pointInfo; - - if(points == 0) { - throwException(env, "ILpointf array must not be null."); - } - - pointInfo = (ILpointf *)malloc(sizeof(ILpointf) * n); - iluGetImageInfo(pointInfo, n); - - clazz = (*env)->FindClass(env, "org/lwjgl/devil/ILpointf"); - methodId = (*env)->GetMethodID(env, clazz, "<init>", "()V"); - - for(i=1;i<n;i++) { - element = (*env)->NewObject(env, clazz, methodId); - - fieldId = (*env)->GetFieldID(env, clazz, "x", "F"); - (*env)->SetFloatField(env, element, fieldId, (jfloat)((pointInfo + i)->x)); - - fieldId = (*env)->GetFieldID(env, clazz, "y", "F"); - (*env)->SetFloatField(env, element, fieldId, (jfloat)((pointInfo + i)->y)); - printf("\nHere 3"); - printf("\n (pointInfo + i)->x) = %f", (pointInfo + i)->x); - printf("\n(*env)->GetFloatField(env, element, fieldId) = %f", (*env)->GetFloatField(env, element, fieldId)); - - printf("\npoints address=%p", points); - printf("\nelement address=%p", element); - printf("\ni = %d", i); - (*env)->SetObjectArrayElement(env, points, i, element); - printf("\nHere 4"); - } - printf("\nHere 5"); - - free(pointInfo);*/ -} - -/* - * Class: org_lwjgl_devil_ILU - * Method: iluRegioniv - * Signature: ([Lorg/lwjgl/devil/ILpointi;I)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_iluRegioniv(JNIEnv *env, jclass clazz, jobjectArray points, jint n) { -} - -/* - * Class: org_lwjgl_devil_ILU * Method: iluReplaceColour * Signature: (BBBF)Z */ @@ -618,7 +569,7 @@ {"iluGenImage", "()I", (void*)&Java_org_lwjgl_devil_ILU_iluGenImage, "iluGenImage", (void*)&iluGenImage}, {"iluGetImageInfo", "(Lorg/lwjgl/devil/ILinfo;)V", (void*)&Java_org_lwjgl_devil_ILU_iluGetImageInfo, "iluGetImageInfo", (void*)&iluGetImageInfo}, {"iluGetInteger", "(I)I", (void*)&Java_org_lwjgl_devil_ILU_iluGetInteger, "iluGetInteger", (void*)&iluGetInteger}, - //{"niluGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void*)&Java_org_lwjgl_devil_ILU_niluGetIntegerv, "iluGetIntegerv", (void*)&iluGetIntegerv}, + {"niluGetIntegerv", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_devil_ILU_niluGetIntegerv, "iluGetIntegerv", (void*)&iluGetIntegerv}, {"iluGetString", "(I)Ljava/lang/String;", (void*)&Java_org_lwjgl_devil_ILU_iluGetString, "iluGetString", (void*)&iluGetString}, {"iluImageParameter", "(II)V", (void*)&Java_org_lwjgl_devil_ILU_iluImageParameter, "iluImageParameter", (void*)&iluImageParameter}, {"iluInit", "()V", (void*)&Java_org_lwjgl_devil_ILU_iluInit, "iluInit", (void*)&iluInit}, |
|
From: Elias N. <eli...@us...> - 2005-03-28 10:29:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28456 Modified Files: context.c Log Message: Linux: Added missing NULL check Index: context.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/context.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- context.c 24 Feb 2005 10:44:33 -0000 1.4 +++ context.c 28 Mar 2005 10:29:16 -0000 1.5 @@ -267,6 +267,10 @@ peer_info->glx13 = extension_flags.GLX13; if (peer_info->glx13) { GLXFBConfig *configs = chooseVisualGLX13(env, display, screen, pixel_format, use_display_bpp, drawable_type, double_buffered); + if (configs == NULL) { + throwException(env, "Could not choose GLX13 config"); + return false; + } if (isDebugEnabled()) { XVisualInfo *vis_info = _glXGetVisualFromFBConfig(display, configs[0]); if (vis_info != NULL) { @@ -278,7 +282,7 @@ int result = _glXGetFBConfigAttrib(display, configs[0], GLX_FBCONFIG_ID, &config_id); XFree(configs); if (result != Success) { - throwException(env, "Could not choose GLX13 config"); + throwException(env, "Could not get GLX_FBCONFIG_ID from GLXFBConfig"); return false; } peer_info->config.glx13_config.config_id = config_id; |
|
From: Brian M. <ma...@us...> - 2005-03-28 10:07:39
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17156 Modified Files: IL.java Log Message: added missing v methods Index: IL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil/IL.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- IL.java 27 Mar 2005 19:34:44 -0000 1.11 +++ IL.java 28 Mar 2005 10:07:30 -0000 1.12 @@ -351,6 +351,15 @@ public static native void ilModAlpha(int AlphaValue); public static native void ilSetAlpha(int AlphaValue); public static native boolean ilGetBoolean(int Mode); + public static void ilGetBooleanv(int mode, ByteBuffer param) { + nilGetBooleanv(mode, param, param.position()); + } + private static native void nilGetBooleanv(int mode, ByteBuffer param, int position); + public static void ilGetIntegerv(int mode, IntBuffer param) { + nilGetIntegerv(mode, param, param.position()); + } + private static native void nilGetIntegerv(int mode, IntBuffer param, int position); + public static native ByteBuffer ilGetData(); public static native int ilGetError(); public static native int ilGetInteger(int mode); @@ -534,31 +543,23 @@ } // public static native int ilGetDXTCData(ILvoid *Buffer, int BufferSize, int DXTCFormat); - // public static native void ilGetBooleanv(int Mode, boolean *Param); - // public static native void ilGetIntegerv(int Mode, int *Param); - // ilIsValidF() uses a Windows file handle so will not be implemented // public static native boolean ilIsValidF(int Type, ILHANDLE File); - // ilLoadF() uses a Windows file handle so will not be implemented // public static native boolean ilLoadF(int Type, ILHANDLE File); - // ilSaveF() uses a Windows file handle so will not be implemented - // public static native int ilSaveF(int Type, ILHANDLE File); + // public static native boolean ilLoadDataF(ILHANDLE File, int Width, int Height, int Depth, ILubyte Bpp); + // public static native int ilSaveF(int Type, ILHANDLE File); // public static native void ilRegisterFormat(int Format); // public static native boolean ilRegisterLoad(String Ext, IL_LOADPROC Load); // public static native boolean ilRegisterMipNum(int Num); // public static native boolean ilRegisterNumImages(int Num); // public static native void ilRegisterOrigin(int Origin); - // public static void ilRegisterPal(ByteBuffer Pal, int Size, int Type) { - // BufferChecks.checkDirect(Pal); - // nilRegisterPal(Pal, Pal.position(), Size, Type); - // } + // public static void ilRegisterPal(ByteBuffer Pal, int Size, int Type); // public static native void nilRegisterPal(ByteBuffer Pal, int pal_position, int Size, int Type); // public static native boolean ilRegisterSave(String Ext, IL_SAVEPROC Save); // public static native void ilRegisterType(int Type); // public static native void ilSetMemory(mAlloc, mFree); // public static native void ilSetRead(fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc); // public static native void ilSetWrite(fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc); - // public static native boolean ilLoadDataF(ILHANDLE File, int Width, int Height, int Depth, ILubyte Bpp); - + static { System.loadLibrary("lwjgl-devil"); |
|
From: Brian M. <ma...@us...> - 2005-03-28 10:06:18
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16280 Modified Files: org_lwjgl_devil_IL.c Log Message: added missing v methods Index: org_lwjgl_devil_IL.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/org_lwjgl_devil_IL.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- org_lwjgl_devil_IL.c 25 Mar 2005 10:25:07 -0000 1.17 +++ org_lwjgl_devil_IL.c 28 Mar 2005 10:06:06 -0000 1.18 @@ -431,6 +431,26 @@ /* * Class: org_lwjgl_devil_IL + * Method: nilGetBooleanv + * Signature: (ILjava/nio/ByteBuffer;I)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_nilGetBooleanv(JNIEnv *env, jclass clazz, jint mode, jobject param, jint param_offset) { + ILboolean *nParam = (ILboolean *) safeGetBufferAddress(env, param) + param_offset; + ilGetBooleanv(mode, nParam); +} + +/* + * Class: org_lwjgl_devil_IL + * Method: nilGetIntegerv + * Signature: (ILjava/nio/IntBuffer;I)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_nilGetIntegerv(JNIEnv *env, jclass clazz, jint mode, jobject param, jint param_offset) { + ILint *nParam = (ILint *) safeGetBufferAddress(env, param) + param_offset; + ilGetIntegerv(mode, nParam); +} + +/* + * Class: org_lwjgl_devil_IL * Method: ilGetData * Signature: ()[B */ |
|
From: Elias N. <eli...@us...> - 2005-03-28 10:03:12
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14853 Modified Files: Makefile.macosx Log Message: Index: Makefile.macosx =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/Makefile.macosx,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.macosx 28 Mar 2005 09:58:55 -0000 1.4 +++ Makefile.macosx 28 Mar 2005 10:03:03 -0000 1.5 @@ -10,7 +10,7 @@ $(LIBRARY): $(OBJECTS) $(LINKER) $(CFLAGS_LINK) -o $@ $(OBJECTS) $(LIBS) - $(STRIP) $@ + $(STRIP) -S -X $@ .c.o: $(CC) $(CFLAGS_O) $< -o $@ |
|
From: Elias N. <eli...@us...> - 2005-03-28 09:59:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12914 Modified Files: Makefile.macosx Log Message: Index: Makefile.macosx =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/Makefile.macosx,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.macosx 28 Mar 2005 09:49:17 -0000 1.3 +++ Makefile.macosx 28 Mar 2005 09:58:55 -0000 1.4 @@ -6,7 +6,7 @@ CFLAGS_O=-fPIC -O2 -D_MACOSX -Wall -c -I.. -I. -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers SRC=$(wildcard *.c) ../common_tools.c OBJECTS=$(subst .c,.o,$(SRC)) -LIBRARY=liblwjgl-devil.so +LIBRARY=liblwjgl-devil.jnilib $(LIBRARY): $(OBJECTS) $(LINKER) $(CFLAGS_LINK) -o $@ $(OBJECTS) $(LIBS) |
|
From: Elias N. <eli...@us...> - 2005-03-28 09:49:31
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8438 Modified Files: Makefile.macosx Log Message: Index: Makefile.macosx =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/Makefile.macosx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.macosx 28 Mar 2005 09:47:28 -0000 1.2 +++ Makefile.macosx 28 Mar 2005 09:49:17 -0000 1.3 @@ -1,9 +1,9 @@ CC=gcc LINKER=gcc STRIP=strip -CFLAGS_LINK=-dynamiclib -Wall +CFLAGS_LINK=-dynamiclib -Wall -framework JavaVM LIBS=-lpthread -CFLAGS_O=-fPIC -O2 -D_MACOSX -Wall -c -I.. -I. -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -framework JavaVM +CFLAGS_O=-fPIC -O2 -D_MACOSX -Wall -c -I.. -I. -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers SRC=$(wildcard *.c) ../common_tools.c OBJECTS=$(subst .c,.o,$(SRC)) LIBRARY=liblwjgl-devil.so |
|
From: Elias N. <eli...@us...> - 2005-03-28 09:47:45
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7510 Modified Files: Makefile.macosx Log Message: Index: Makefile.macosx =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/Makefile.macosx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.macosx 28 Mar 2005 09:33:32 -0000 1.1 +++ Makefile.macosx 28 Mar 2005 09:47:28 -0000 1.2 @@ -1,9 +1,9 @@ CC=gcc LINKER=gcc STRIP=strip -CFLAGS_LINK=-shared -Wall +CFLAGS_LINK=-dynamiclib -Wall LIBS=-lpthread -CFLAGS_O=-fPIC -O2 -D_MACOSX -Wall -c -I.. -I. -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers +CFLAGS_O=-fPIC -O2 -D_MACOSX -Wall -c -I.. -I. -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -framework JavaVM SRC=$(wildcard *.c) ../common_tools.c OBJECTS=$(subst .c,.o,$(SRC)) LIBRARY=liblwjgl-devil.so |
|
From: Elias N. <eli...@us...> - 2005-03-28 09:33:42
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30596 Added Files: Makefile.macosx Log Message: Added Devil Mac OS X makefile --- NEW FILE: Makefile.macosx --- CC=gcc LINKER=gcc STRIP=strip CFLAGS_LINK=-shared -Wall LIBS=-lpthread CFLAGS_O=-fPIC -O2 -D_MACOSX -Wall -c -I.. -I. -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers SRC=$(wildcard *.c) ../common_tools.c OBJECTS=$(subst .c,.o,$(SRC)) LIBRARY=liblwjgl-devil.so $(LIBRARY): $(OBJECTS) $(LINKER) $(CFLAGS_LINK) -o $@ $(OBJECTS) $(LIBS) $(STRIP) $@ .c.o: $(CC) $(CFLAGS_O) $< -o $@ clean: rm -f $(OBJECTS) $(LIBRARY) |