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
(5) |
2
(5) |
3
(1) |
4
(1) |
5
(5) |
6
|
|
7
(22) |
8
(2) |
9
(10) |
10
(5) |
11
(5) |
12
(1) |
13
|
|
14
|
15
(2) |
16
|
17
|
18
(2) |
19
|
20
|
|
21
(13) |
22
(4) |
23
(3) |
24
(14) |
25
(6) |
26
(26) |
27
(26) |
|
28
(2) |
29
(13) |
30
(17) |
31
(2) |
|
|
|
|
From: Elias N. <eli...@us...> - 2004-03-27 15:19:07
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27652/src/java/org/lwjgl Modified Files: Sys.java Log Message: Implemented version check to check for incompatible native libraries Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Sys.java 27 Mar 2004 13:48:57 -0000 1.43 +++ Sys.java 27 Mar 2004 14:09:53 -0000 1.44 @@ -47,6 +47,8 @@ * @version $Revision$ */ public final class Sys { + public static final String VERSION = "0.9pre"; + /** Low process priority. @see #setProcessPriority() */ public static final int LOW_PRIORITY = -1; @@ -78,9 +80,9 @@ /** The native library name */ private static String LIBRARY_NAME = "lwjgl"; - - /** The platform being executed on */ - private static String PLATFORM; + + /** The platform being executed on */ + private static String PLATFORM; /** * Debug flag. @@ -91,12 +93,6 @@ static { initialize(); - - // check platform name, and default to awt - PLATFORM = System.getProperty("org.lwjgl.Sys.platform"); - if(PLATFORM == null) { - PLATFORM = "org.lwjgl.SwingAdapter"; - } } /** @@ -130,9 +126,19 @@ return; initialized = true; System.loadLibrary(LIBRARY_NAME); + String native_version = getNativeLibraryVersion(); + if (!native_version.equals(VERSION)) + throw new IllegalStateException("Version mismatch: jar version is '" + VERSION + + "', native libary version is '" + native_version + "'"); setDebug(DEBUG); setTime(0); + // check platform name, and default to awt + PLATFORM = System.getProperty("org.lwjgl.Sys.platform"); + if(PLATFORM == null) { + PLATFORM = "org.lwjgl.SwingAdapter"; + } + Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { Display.resetDisplayMode(); @@ -148,7 +154,12 @@ } /** - * Set the debug level of the native library + * Return the version of the native library + */ + private static native String getNativeLibraryVersion(); + + /** + * Set the debug level of the native library */ private static native void setDebug(boolean debug); |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:17:07
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27652/src/native/common Modified Files: checkALerror.h common_tools.cpp common_tools.h org_lwjgl_Sys.h Log Message: Implemented version check to check for incompatible native libraries Index: org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- org_lwjgl_Sys.h 26 Feb 2004 21:54:05 -0000 1.20 +++ org_lwjgl_Sys.h 27 Mar 2004 14:09:54 -0000 1.21 @@ -16,7 +16,17 @@ #undef org_lwjgl_Sys_REALTIME_PRIORITY #define org_lwjgl_Sys_REALTIME_PRIORITY 2L /* Inaccessible static: LIBRARY_NAME */ +/* Inaccessible static: PLATFORM */ /* Inaccessible static: DEBUG */ +/* Inaccessible static: initialized */ +/* + * Class: org_lwjgl_Sys + * Method: getNativeLibraryVersion + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getNativeLibraryVersion + (JNIEnv *, jclass); + /* * Class: org_lwjgl_Sys * Method: setDebug Index: checkALerror.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/checkALerror.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- checkALerror.h 20 Dec 2003 22:03:24 -0000 1.9 +++ checkALerror.h 27 Mar 2004 14:09:54 -0000 1.10 @@ -16,7 +16,7 @@ #define CHECK_AL_ERROR \ { \ - if (ISDEBUGENABLED()) { \ + if (isDebugEnabled()) { \ int err = alGetError(); \ if (err != AL_NO_ERROR) { \ jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); \ @@ -28,7 +28,7 @@ /* only available if deviceaddress is specified in method */ #define CHECK_ALC_ERROR \ { \ - if (ISDEBUGENABLED()) { \ + if (isDebugEnabled()) { \ int err = alcGetError((ALCdevice*) deviceaddress); \ if (err != AL_NO_ERROR) { \ jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); \ Index: common_tools.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- common_tools.cpp 26 Mar 2004 21:11:20 -0000 1.14 +++ common_tools.cpp 27 Mar 2004 14:09:54 -0000 1.15 @@ -40,7 +40,16 @@ #include <stdlib.h> #include "common_tools.h" -bool debug = false; +static bool debug = false; +static const char* VERSION = "0.9pre"; + +jstring getVersionString(JNIEnv *env) { + return env->NewStringUTF(VERSION); +} + +bool isDebugEnabled(void) { + return debug; +} void setDebugEnabled(bool enable) { debug = enable; @@ -49,7 +58,7 @@ void printfDebug(const char *format, ...) { va_list ap; va_start(ap, format); - if (ISDEBUGENABLED()) + if (isDebugEnabled()) vfprintf(stderr, format, ap); va_end(ap); } Index: common_tools.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- common_tools.h 26 Mar 2004 21:11:20 -0000 1.13 +++ common_tools.h 27 Mar 2004 14:09:54 -0000 1.14 @@ -43,11 +43,8 @@ #include <jni.h> #include "org_lwjgl_Sys.h" -extern bool debug; - // Must be x * max_event_size + 1 #define EVENT_BUFFER_SIZE (25 * 4 + 1) -#define ISDEBUGENABLED() (debug) typedef struct { unsigned char input_event_buffer[EVENT_BUFFER_SIZE]; @@ -56,6 +53,8 @@ int list_end; } event_queue_t; +extern bool isDebugEnabled(void); +extern jstring getVersionString(JNIEnv *env); extern void initEventQueue(event_queue_t *event_queue); extern int copyEvents(event_queue_t *event_queue, unsigned char *output_event_buffer, int buffer_size, int event_size); extern void putEventElement(event_queue_t *queue, unsigned char byte); |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/java/org/lwjgl/opengl Modified Files: Pbuffer.java Window.java Log Message: Renamed LWJGLErrorException to LWJGLException Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Pbuffer.java 27 Mar 2004 14:42:46 -0000 1.14 +++ Pbuffer.java 27 Mar 2004 15:05:23 -0000 1.15 @@ -33,7 +33,7 @@ package org.lwjgl.opengl; import org.lwjgl.Sys; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; import java.nio.IntBuffer; @@ -160,7 +160,7 @@ } /** - * Construct an instance of a Pbuffer. If this fails then an LWJGLErrorException will be thrown. The buffer is single-buffered. + * Construct an instance of a Pbuffer. If this fails then an LWJGLException will be thrown. The buffer is single-buffered. * <p/> * NOTE: An OpenGL window must be created before a Pbuffer can be created. The Pbuffer will have its own context that shares * display lists and textures with the OpenGL window context, but it will have its own OpenGL state. Therefore, state changes @@ -183,7 +183,7 @@ * 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. * @param renderTexture */ - public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil, int samples, RenderTexture renderTexture) throws LWJGLErrorException { + public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil, int samples, RenderTexture renderTexture) throws LWJGLException { this.width = width; this.height = height; @@ -241,7 +241,7 @@ int bpp, int alpha, int depth, int stencil, int samples, IntBuffer pixelFormatCaps, int pixelFormatCapsSize, - IntBuffer pBufferAttribs, int pBufferAttribsSize) throws LWJGLErrorException; + IntBuffer pBufferAttribs, int pBufferAttribsSize) throws LWJGLException; /** * Destroys the Pbuffer. After this call, there will be no valid GL rendering context - regardless of whether this Pbuffer was Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- Window.java 27 Mar 2004 14:42:46 -0000 1.34 +++ Window.java 27 Mar 2004 15:05:23 -0000 1.35 @@ -52,7 +52,7 @@ import org.lwjgl.input.Controller; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; public final class Window { @@ -287,33 +287,33 @@ * buffer, probably no alpha buffer, and probably no multisampling. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title - * @throws LWJGLErrorException + * @throws LWJGLException */ - public static void create(String title) throws LWJGLErrorException { + public static void create(String title) throws LWJGLException { create(title, Display.getDepth(), 0, 16, 8, 0); } /** * Create a fullscreen window. If the underlying OS does not * support fullscreen mode, then a window will be created instead. If this - * fails too then an LWJGLErrorException will be thrown. + * fails too then an LWJGLException will be thrown. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title The title of the window * @param bpp Minimum bits per pixel * @param alpha Minimum bits per pixel in alpha buffer * @param depth Minimum bits per pixel in depth buffer * @param stencil Minimum bits per pixel in stencil buffer - * @throws LWJGLErrorException if the window could not be created for any reason; typically because + * @throws LWJGLException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int bpp, int alpha, int depth, int stencil) throws LWJGLErrorException { + public static void create(String title, int bpp, int alpha, int depth, int stencil) throws LWJGLException { create(title, bpp, alpha, depth, stencil, 0); } /** * Create a fullscreen window. If the underlying OS does not * support fullscreen mode, then a window will be created instead. If this - * fails too then an LWJGLErrorException will be thrown. + * fails too then an LWJGLException will be thrown. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title The title of the window * @param bpp Minimum bits per pixel @@ -322,10 +322,10 @@ * @param stencil Minimum bits per pixel in stencil buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws LWJGLErrorException if the window could not be created for any reason; typically because + * @throws LWJGLException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLErrorException { + public static void create(String title, int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLException { if (isCreated()) throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); Window.fullscreen = true; @@ -339,7 +339,7 @@ /** * Create a window. If the underlying OS does not have "floating" windows, then a fullscreen - * display will be created instead. If this fails too then an LWJGLErrorException will be thrown. + * display will be created instead. If this fails too then an LWJGLException will be thrown. * If the window is created fullscreen, then its size may not match the specified size * here. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. @@ -353,16 +353,16 @@ * @param depth Minimum bits per pixel in depth buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws LWJGLErrorException if the window could not be created for any reason; typically because + * @throws LWJGLException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) throws LWJGLErrorException { + public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) throws LWJGLException { create(title, x, y, width, height, bpp, alpha, depth, stencil, 0); } /** * Create a window. If the underlying OS does not have "floating" windows, then a fullscreen - * display will be created instead. If this fails too then an LWJGLErrorException will be thrown. + * display will be created instead. If this fails too then an LWJGLException will be thrown. * If the window is created fullscreen, then its size may not match the specified size * here. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. @@ -377,11 +377,11 @@ * @param stencil Minimum bits per pixel in stencil buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws LWJGLErrorException if the window could not be created for any reason; typically because + * @throws LWJGLException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil, int samples) - throws LWJGLErrorException { + throws LWJGLException { if (isCreated()) throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); Window.fullscreen = false; @@ -395,7 +395,7 @@ /** * Create the native window peer. - * @throws LWJGLErrorException + * @throws LWJGLException */ private static native void nCreate( String title, @@ -409,9 +409,9 @@ int depth, int stencil, int samples) - throws LWJGLErrorException; + throws LWJGLException; - private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLErrorException { + private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLException { nCreate(title, x, y, width, height, fullscreen, bpp, alpha, depth, stencil, samples); context = new Window(); makeCurrent(); @@ -431,7 +431,7 @@ Mouse.create(); createdMouse = true; Mouse.enableBuffer(); - } catch (LWJGLErrorException e) { + } catch (LWJGLException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { @@ -445,7 +445,7 @@ createdKeyboard = true; Keyboard.enableBuffer(); Keyboard.enableTranslation(); - } catch (LWJGLErrorException e) { + } catch (LWJGLException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { @@ -457,7 +457,7 @@ try { Controller.create(); createdController = true; - } catch (LWJGLErrorException e) { + } catch (LWJGLException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/native/common Modified Files: common_tools.cpp Log Message: Renamed LWJGLErrorException to LWJGLException Index: common_tools.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- common_tools.cpp 27 Mar 2004 14:42:47 -0000 1.16 +++ common_tools.cpp 27 Mar 2004 15:05:24 -0000 1.17 @@ -120,7 +120,7 @@ } void throwException(JNIEnv * env, const char * err) { - throwGeneralException(env, "org/lwjgl/LWJGLErrorException", err); + throwGeneralException(env, "org/lwjgl/LWJGLException", err); } void doExtension(JNIEnv *env, jobject ext_set, const char *method_name, const char *ext) { |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/java/org/lwjgl/openal Modified Files: AL.java ALC.java Log Message: Renamed LWJGLErrorException to LWJGLException Index: ALC.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALC.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ALC.java 27 Mar 2004 14:42:46 -0000 1.16 +++ ALC.java 27 Mar 2004 15:05:23 -0000 1.17 @@ -35,7 +35,7 @@ import java.nio.IntBuffer; import org.lwjgl.Sys; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -159,9 +159,9 @@ /** * Creates the ALC instance * - * @throws LWJGLErrorException if a failiure occured in the ALC creation process + * @throws LWJGLException if a failiure occured in the ALC creation process */ - protected static void create() throws LWJGLErrorException { + protected static void create() throws LWJGLException { if (created) { return; } Index: AL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- AL.java 27 Mar 2004 14:42:46 -0000 1.20 +++ AL.java 27 Mar 2004 15:05:23 -0000 1.21 @@ -37,7 +37,7 @@ import org.lwjgl.Display; import org.lwjgl.Sys; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -87,7 +87,7 @@ * @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 LWJGLErrorException; + protected static native void nCreate(String[] oalPaths) throws LWJGLException; /** * Native method the destroy the AL @@ -112,7 +112,7 @@ * @param contextSynchronized Flag, indicating a synchronous context.* */ public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized) - throws LWJGLErrorException { + throws LWJGLException { if (created) { return; @@ -131,7 +131,7 @@ * Creates an OpenAL instance. The empty create will cause OpenAL to * open the default device, and create a context using default values. */ - public static void create() throws LWJGLErrorException { + public static void create() throws LWJGLException { if(created) { return; } @@ -152,7 +152,7 @@ jwsLibname = "openal"; break; default: - throw new LWJGLErrorException("Unknown platform"); + throw new LWJGLException("Unknown platform"); } String jwsPath = getPathFromJWS(jwsLibname); |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/java/org/lwjgl/input Modified Files: Controller.java Cursor.java Keyboard.java Mouse.java Log Message: Renamed LWJGLErrorException to LWJGLException Index: Controller.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Controller.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Controller.java 27 Mar 2004 14:42:46 -0000 1.15 +++ Controller.java 27 Mar 2004 15:05:22 -0000 1.16 @@ -37,7 +37,7 @@ import org.lwjgl.Sys; import org.lwjgl.opengl.Window; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -164,9 +164,9 @@ /** * "Create" the controller. The display must first have been created. - * @throws LWJGLErrorException if the controller could not be created for any reason + * @throws LWJGLException if the controller could not be created for any reason */ - public static void create() throws LWJGLErrorException { + public static void create() throws LWJGLException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created before you can create Controller"); initialize(); @@ -268,7 +268,7 @@ /** * Native method to create the controller */ - private static native void nCreate() throws LWJGLErrorException; + private static native void nCreate() throws LWJGLException; /** * Native method the destroy the controller Index: Cursor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Cursor.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Cursor.java 27 Mar 2004 14:42:46 -0000 1.19 +++ Cursor.java 27 Mar 2004 15:05:22 -0000 1.20 @@ -37,7 +37,7 @@ import java.nio.IntBuffer; import org.lwjgl.Sys; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -69,9 +69,9 @@ * @param numImages number of cursor images specified. Must be 1 if animations are not supported. * @param images A buffer containing the images. The origin is at the lower left corner, like OpenGL. * @param delays An int buffer of animation frame delays, if numImages is greater than 1, else null - * @throws LWJGLErrorException if the cursor could not be created for any reason + * @throws LWJGLException if the cursor could not be created for any reason */ - public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLErrorException { + public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { if (!Mouse.isCreated()) throw new IllegalStateException("Mouse must be created before creating cursor objects"); if (width*height*numImages > images.remaining()) @@ -95,7 +95,7 @@ /** * Creates the actual cursor, using a platform specific class */ - private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLErrorException { + private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { // create copy and flip images to match ogl IntBuffer images_copy = ByteBuffer.allocateDirect(images.remaining()*4).order(ByteOrder.nativeOrder()).asIntBuffer(); flipImages(width, height, numImages, images, images_copy); Index: Keyboard.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Keyboard.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Keyboard.java 27 Mar 2004 14:42:46 -0000 1.43 +++ Keyboard.java 27 Mar 2004 15:05:23 -0000 1.44 @@ -41,7 +41,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.Sys; import org.lwjgl.opengl.Window; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -285,9 +285,9 @@ * "Create" the keyboard. The display must first have been created. The * reason for this is so the keyboard has a window to "focus" in. * - * @throws LWJGLErrorException if the keyboard could not be created for any reason + * @throws LWJGLException if the keyboard could not be created for any reason */ - public static void create() throws LWJGLErrorException { + public static void create() throws LWJGLException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created before you can create Keyboard"); if (!initialized) @@ -301,7 +301,7 @@ /** * Native method to create the keyboard */ - private static native void nCreate() throws LWJGLErrorException; + private static native void nCreate() throws LWJGLException; /** * @return true if the keyboard has been created @@ -389,7 +389,7 @@ * Enable keyboard translation. Must be called after the keyboard is created, * and keyboard buffering must be enabled. */ - public static void enableTranslation() throws LWJGLErrorException { + public static void enableTranslation() throws LWJGLException { if (!created) throw new IllegalStateException("Keyboard must be created before you can read events"); if (readBuffer == null) @@ -401,12 +401,12 @@ /** * Native method to enable the translation buffer */ - private static native void nEnableTranslation() throws LWJGLErrorException; + private static native void nEnableTranslation() throws LWJGLException; /** * Enable keyboard buffering. Must be called after the keyboard is created. */ - public static void enableBuffer() throws LWJGLErrorException { + public static void enableBuffer() throws LWJGLException { if (!created) throw new IllegalStateException("Keyboard must be created before you can enable buffering"); readBuffer = BufferUtils.createByteBuffer(4*BUFFER_SIZE); @@ -419,7 +419,7 @@ * @return the event buffer, * or null if no buffer can be allocated */ - private static native void nEnableBuffer() throws LWJGLErrorException; + private static native void nEnableBuffer() throws LWJGLException; /** * Checks to see if a key is down. Index: Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- Mouse.java 27 Mar 2004 14:42:46 -0000 1.45 +++ Mouse.java 27 Mar 2004 15:05:23 -0000 1.46 @@ -39,7 +39,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.Sys; import org.lwjgl.opengl.Window; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -165,9 +165,9 @@ * * @param cursor the native cursor object to bind. May be null. * @return The previous Cursor object set, or null. - * @throws LWJGLErrorException if the cursor could not be set for any reason + * @throws LWJGLException if the cursor could not be set for any reason */ - public static Cursor setNativeCursor(Cursor cursor) throws LWJGLErrorException { + public static Cursor setNativeCursor(Cursor cursor) throws LWJGLException { if (!created) throw new IllegalStateException("Create the Mouse before setting the native cursor"); if ((getNativeCursorCaps() & CURSOR_ONE_BIT_TRANSPARENCY) == 0) @@ -184,7 +184,7 @@ } /** Native method to set the native cursor */ - private static native void nSetNativeCursor(long handle) throws LWJGLErrorException; + private static native void nSetNativeCursor(long handle) throws LWJGLException; /** * Gets the minimum size of a native cursor. Can only be called if @@ -239,9 +239,9 @@ /** * "Create" the mouse. The display must first have been created. * - * @throws LWJGLErrorException if the mouse could not be created for any reason + * @throws LWJGLException if the mouse could not be created for any reason */ - public static void create() throws LWJGLErrorException { + public static void create() throws LWJGLException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created prior to creating mouse"); @@ -294,7 +294,7 @@ if (currentCursor != null) { try { setNativeCursor(null); - } catch (LWJGLErrorException e) { + } catch (LWJGLException e) { if (Sys.DEBUG) e.printStackTrace(); } @@ -402,7 +402,7 @@ /** * Enable mouse button buffering. Must be called after the mouse is created. */ - public static void enableBuffer() throws LWJGLErrorException { + public static void enableBuffer() throws LWJGLException { if (!created) throw new IllegalStateException("Mouse must be created before you can enable buffering"); readBuffer = BufferUtils.createByteBuffer(2*BUFFER_SIZE); @@ -415,7 +415,7 @@ * @return the event buffer, * or null if no buffer can be allocated */ - private static native void nEnableBuffer() throws LWJGLErrorException; + private static native void nEnableBuffer() throws LWJGLException; /** * Reads all button events since last read. @@ -546,7 +546,7 @@ currentCursor.nextCursor(); try { setNativeCursor(currentCursor); - } catch (LWJGLErrorException e) { + } catch (LWJGLException e) { if (Sys.DEBUG) e.printStackTrace(); } |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:32
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/java/org/lwjgl/openal/eax Modified Files: EAX.java Log Message: Renamed LWJGLErrorException to LWJGLException Index: EAX.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAX.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- EAX.java 27 Mar 2004 14:42:46 -0000 1.9 +++ EAX.java 27 Mar 2004 15:05:23 -0000 1.10 @@ -33,7 +33,7 @@ package org.lwjgl.openal.eax; import org.lwjgl.Sys; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -54,15 +54,15 @@ /** * Loads the EAX functions * - * @throws LWJGLErrorException if the EAX extensions couldn't be loaded + * @throws LWJGLException if the EAX extensions couldn't be loaded */ - public static void create() throws LWJGLErrorException { + public static void create() throws LWJGLException { if (created) { return; } if (!nCreate()) { - throw new LWJGLErrorException("EAX instance could not be created."); + throw new LWJGLException("EAX instance could not be created."); } EAX20.init(); created = true; |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:32
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/java/org/lwjgl Modified Files: Display.java Sys.java Added Files: LWJGLException.java Removed Files: LWJGLErrorException.java Log Message: Renamed LWJGLErrorException to LWJGLException --- NEW FILE: LWJGLException.java --- package org.lwjgl; public class LWJGLException extends Exception { public LWJGLException(String msg) { super(msg); } } --- LWJGLErrorException.java DELETED --- Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Display.java 27 Mar 2004 14:42:45 -0000 1.43 +++ Display.java 27 Mar 2004 15:05:22 -0000 1.44 @@ -131,9 +131,9 @@ * still need to query the display's characteristics using getDisplayMode(). * * @param mode The new display mode to set - * @throws LWJGLErrorException if the display mode could not be set + * @throws LWJGLException if the display mode could not be set */ - public static native void setDisplayMode(DisplayMode mode) throws LWJGLErrorException; + public static native void setDisplayMode(DisplayMode mode) throws LWJGLException; /** * Reset the display mode to whatever it was when LWJGL was initialized. @@ -195,14 +195,14 @@ * @param brightness The brightness value between -1.0 and 1.0, inclusive * @param contrast The contrast, larger than 0.0. */ - public static void setDisplayConfiguration(float gamma, float brightness, float contrast) throws LWJGLErrorException { + public static void setDisplayConfiguration(float gamma, float brightness, float contrast) throws LWJGLException { if (brightness < -1.0f || brightness > 1.0f) throw new IllegalArgumentException("Invalid brightness value"); if (contrast < 0.0f) throw new IllegalArgumentException("Invalid contrast value"); int rampSize = getGammaRampLength(); if (rampSize == 0) { - throw new LWJGLErrorException("Display configuration not supported"); + throw new LWJGLException("Display configuration not supported"); } FloatBuffer gammaRamp = ByteBuffer.allocateDirect(rampSize*4).order(ByteOrder.nativeOrder()).asFloatBuffer(); for (int i = 0; i < rampSize; i++) { @@ -235,7 +235,7 @@ /** * Native method to set the gamma ramp. */ - private static native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLErrorException; + private static native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; /** * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", "PS2", Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- Sys.java 27 Mar 2004 14:09:53 -0000 1.44 +++ Sys.java 27 Mar 2004 15:05:22 -0000 1.45 @@ -128,7 +128,7 @@ System.loadLibrary(LIBRARY_NAME); String native_version = getNativeLibraryVersion(); if (!native_version.equals(VERSION)) - throw new IllegalStateException("Version mismatch: jar version is '" + VERSION + + throw new LinkageError("Version mismatch: jar version is '" + VERSION + "', native libary version is '" + native_version + "'"); setDebug(DEBUG); setTime(0); |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:15:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27652/src/native/linux Modified Files: org_lwjgl_Sys.cpp org_lwjgl_opengl_Window.cpp Log Message: Implemented version check to check for incompatible native libraries 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.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- org_lwjgl_opengl_Window.cpp 26 Mar 2004 11:04:44 -0000 1.24 +++ org_lwjgl_opengl_Window.cpp 27 Mar 2004 14:09:54 -0000 1.25 @@ -420,7 +420,7 @@ createWindow(env, disp, screen, vis_info, title, x, y, width, height, fscreen); glx_window = glXCreateWindow(disp, configs[0], getCurrentWindow(), NULL); makeCurrent(); - if (ISDEBUGENABLED()) + if (isDebugEnabled()) dumpVisualInfo(disp, vis_info); XFree(configs); XFree(vis_info); @@ -433,7 +433,7 @@ throwException(env, "Could not find a matching pixel format"); return false; } - if (ISDEBUGENABLED()) + if (isDebugEnabled()) dumpVisualInfo(disp, vis_info); context = glXCreateContext(disp, vis_info, NULL, True); if (context == NULL) { Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Sys.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- org_lwjgl_Sys.cpp 27 Feb 2004 09:54:37 -0000 1.23 +++ org_lwjgl_Sys.cpp 27 Mar 2004 14:09:54 -0000 1.24 @@ -165,6 +165,10 @@ env->ReleaseStringUTFChars(title, cTitleBarText); } +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getNativeLibraryVersion(JNIEnv *env, jclass clazz) { + return getVersionString(env); +} + /* * Class: org_lwjgl_Sys * Method: openURL |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:57:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/java/org/lwjgl Modified Files: Display.java SwingAdapter.java Added Files: LWJGLErrorException.java Log Message: Added LWJGLErrorException to replace the too general Exception Index: SwingAdapter.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/SwingAdapter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SwingAdapter.java 7 Mar 2004 15:20:28 -0000 1.1 +++ SwingAdapter.java 27 Mar 2004 14:42:45 -0000 1.2 @@ -52,7 +52,7 @@ */ SwingAdapter() { } - + /** * Spawn a "modal" dialog in the centre of the screen with a message in it * and an OK button. This method blocks until the dialog is dismissed. @@ -60,10 +60,10 @@ * @param message Message to show in alert */ public void alert(String title, String message) { - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch(Exception e) { - } - JOptionPane.showMessageDialog(null, message, title, JOptionPane.WARNING_MESSAGE); + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch(Exception e) { + } + JOptionPane.showMessageDialog(null, message, title, JOptionPane.WARNING_MESSAGE); } } --- NEW FILE: LWJGLErrorException.java --- package org.lwjgl; public class LWJGLErrorException extends Exception { public LWJGLErrorException(String msg) { super(msg); } } Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Display.java 27 Mar 2004 13:48:57 -0000 1.42 +++ Display.java 27 Mar 2004 14:42:45 -0000 1.43 @@ -131,9 +131,9 @@ * still need to query the display's characteristics using getDisplayMode(). * * @param mode The new display mode to set - * @throws Exception if the display mode could not be set + * @throws LWJGLErrorException if the display mode could not be set */ - public static native void setDisplayMode(DisplayMode mode) throws Exception; + public static native void setDisplayMode(DisplayMode mode) throws LWJGLErrorException; /** * Reset the display mode to whatever it was when LWJGL was initialized. @@ -195,14 +195,14 @@ * @param brightness The brightness value between -1.0 and 1.0, inclusive * @param contrast The contrast, larger than 0.0. */ - public static void setDisplayConfiguration(float gamma, float brightness, float contrast) throws Exception { + public static void setDisplayConfiguration(float gamma, float brightness, float contrast) throws LWJGLErrorException { if (brightness < -1.0f || brightness > 1.0f) throw new IllegalArgumentException("Invalid brightness value"); if (contrast < 0.0f) throw new IllegalArgumentException("Invalid contrast value"); int rampSize = getGammaRampLength(); if (rampSize == 0) { - throw new Exception("Display configuration not supported"); + throw new LWJGLErrorException("Display configuration not supported"); } FloatBuffer gammaRamp = ByteBuffer.allocateDirect(rampSize*4).order(ByteOrder.nativeOrder()).asFloatBuffer(); for (int i = 0; i < rampSize; i++) { @@ -235,7 +235,7 @@ /** * Native method to set the gamma ramp. */ - private static native void setGammaRamp(FloatBuffer gammaRamp) throws Exception ; + private static native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLErrorException; /** * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", "PS2", |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:56:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/java/org/lwjgl/openal/eax Modified Files: EAX.java Log Message: Added LWJGLErrorException to replace the too general Exception Index: EAX.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAX.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- EAX.java 27 Mar 2004 13:48:58 -0000 1.8 +++ EAX.java 27 Mar 2004 14:42:46 -0000 1.9 @@ -33,6 +33,7 @@ package org.lwjgl.openal.eax; import org.lwjgl.Sys; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -53,15 +54,15 @@ /** * Loads the EAX functions * - * @throws Exception if the EAX extensions couldn't be loaded + * @throws LWJGLErrorException if the EAX extensions couldn't be loaded */ - public static void create() throws Exception { + public static void create() throws LWJGLErrorException { if (created) { return; } if (!nCreate()) { - throw new Exception("EAX instance could not be created."); + throw new LWJGLErrorException("EAX instance could not be created."); } EAX20.init(); created = true; |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:56:49
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/java/org/lwjgl/input Modified Files: Controller.java Cursor.java Keyboard.java Mouse.java Log Message: Added LWJGLErrorException to replace the too general Exception Index: Controller.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Controller.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Controller.java 27 Mar 2004 13:48:57 -0000 1.14 +++ Controller.java 27 Mar 2004 14:42:46 -0000 1.15 @@ -37,6 +37,7 @@ import org.lwjgl.Sys; import org.lwjgl.opengl.Window; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -163,9 +164,9 @@ /** * "Create" the controller. The display must first have been created. - * @throws Exception if the controller could not be created for any reason + * @throws LWJGLErrorException if the controller could not be created for any reason */ - public static void create() throws Exception { + public static void create() throws LWJGLErrorException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created before you can create Controller"); initialize(); @@ -267,7 +268,7 @@ /** * Native method to create the controller */ - private static native void nCreate() throws Exception; + private static native void nCreate() throws LWJGLErrorException; /** * Native method the destroy the controller @@ -278,122 +279,122 @@ * Register fields with the native library */ private static native void initIDs(); - /** - * @return Returns the buttonCount. - */ - public static int getButtonCount() { - return buttonCount; - } + /** + * @return Returns the buttonCount. + */ + public static int getButtonCount() { + return buttonCount; + } - /** - * @return Returns whether POV is supported - */ - public static boolean hasPOV() { - return hasPOV; - } + /** + * @return Returns whether POV is supported + */ + public static boolean hasPOV() { + return hasPOV; + } - /** - * @return Returns whether a rotational x axis is supported - */ - public static boolean hasRXAxis() { - return hasRXAxis; - } + /** + * @return Returns whether a rotational x axis is supported + */ + public static boolean hasRXAxis() { + return hasRXAxis; + } - /** - * @return Returns whether a rotational y axis is supported - */ - public static boolean hasRYAxis() { - return hasRYAxis; - } + /** + * @return Returns whether a rotational y axis is supported + */ + public static boolean hasRYAxis() { + return hasRYAxis; + } - /** - * @return Returns whether a rotational z axis is supported - */ - public static boolean hasRZAxis() { - return hasRZAxis; - } + /** + * @return Returns whether a rotational z axis is supported + */ + public static boolean hasRZAxis() { + return hasRZAxis; + } - /** - * @return Returns whether a slider is supported - */ - public static boolean hasSlider() { - return hasSlider; - } + /** + * @return Returns whether a slider is supported + */ + public static boolean hasSlider() { + return hasSlider; + } - /** - * @return Returns whether a x axis is supported - */ - public static boolean hasXAxis() { - return hasXAxis; - } + /** + * @return Returns whether a x axis is supported + */ + public static boolean hasXAxis() { + return hasXAxis; + } - /** - * @return Returns whether a y axis is supported - */ - public static boolean hasYAxis() { - return hasYAxis; - } + /** + * @return Returns whether a y axis is supported + */ + public static boolean hasYAxis() { + return hasYAxis; + } - /** - * @return Returns whether a z axis is supported - */ - public static boolean hasZAxis() { - return hasZAxis; - } + /** + * @return Returns whether a z axis is supported + */ + public static boolean hasZAxis() { + return hasZAxis; + } - /** - * @return Returns the POV value - */ - public static int getPov() { - return pov; - } + /** + * @return Returns the POV value + */ + public static int getPov() { + return pov; + } - /** - * @return Returns the rotational value of the x axis - */ - public static int getRx() { - return rx; - } + /** + * @return Returns the rotational value of the x axis + */ + public static int getRx() { + return rx; + } - /** - * @return Returns the rotational value of the y axis - */ - public static int getRy() { - return ry; - } + /** + * @return Returns the rotational value of the y axis + */ + public static int getRy() { + return ry; + } - /** - * @return Returns the rotational value of the z axis - */ - public static int getRz() { - return rz; - } + /** + * @return Returns the rotational value of the z axis + */ + public static int getRz() { + return rz; + } - /** - * @return Returns the slider value - */ - public static int getSlider() { - return slider; - } + /** + * @return Returns the slider value + */ + public static int getSlider() { + return slider; + } - /** - * @return Returns the x axis value - */ - public static int getX() { - return x; - } + /** + * @return Returns the x axis value + */ + public static int getX() { + return x; + } - /** - * @return Returns the y axis value - */ - public static int getY() { - return y; - } + /** + * @return Returns the y axis value + */ + public static int getY() { + return y; + } - /** - * @return Returns the z axis value - */ - public static int getZ() { - return z; - } + /** + * @return Returns the z axis value + */ + public static int getZ() { + return z; + } } Index: Cursor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Cursor.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Cursor.java 27 Mar 2004 13:48:57 -0000 1.18 +++ Cursor.java 27 Mar 2004 14:42:46 -0000 1.19 @@ -37,6 +37,7 @@ import java.nio.IntBuffer; import org.lwjgl.Sys; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -68,9 +69,9 @@ * @param numImages number of cursor images specified. Must be 1 if animations are not supported. * @param images A buffer containing the images. The origin is at the lower left corner, like OpenGL. * @param delays An int buffer of animation frame delays, if numImages is greater than 1, else null - * @throws Exception if the cursor could not be created for any reason + * @throws LWJGLErrorException if the cursor could not be created for any reason */ - public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws Exception { + public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLErrorException { if (!Mouse.isCreated()) throw new IllegalStateException("Mouse must be created before creating cursor objects"); if (width*height*numImages > images.remaining()) @@ -94,7 +95,7 @@ /** * Creates the actual cursor, using a platform specific class */ - private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws Exception { + private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLErrorException { // create copy and flip images to match ogl IntBuffer images_copy = ByteBuffer.allocateDirect(images.remaining()*4).order(ByteOrder.nativeOrder()).asIntBuffer(); flipImages(width, height, numImages, images, images_copy); Index: Keyboard.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Keyboard.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Keyboard.java 27 Mar 2004 13:48:57 -0000 1.42 +++ Keyboard.java 27 Mar 2004 14:42:46 -0000 1.43 @@ -41,6 +41,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.Sys; import org.lwjgl.opengl.Window; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -284,9 +285,9 @@ * "Create" the keyboard. The display must first have been created. The * reason for this is so the keyboard has a window to "focus" in. * - * @throws Exception if the keyboard could not be created for any reason + * @throws LWJGLErrorException if the keyboard could not be created for any reason */ - public static void create() throws Exception { + public static void create() throws LWJGLErrorException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created before you can create Keyboard"); if (!initialized) @@ -300,7 +301,7 @@ /** * Native method to create the keyboard */ - private static native void nCreate() throws Exception; + private static native void nCreate() throws LWJGLErrorException; /** * @return true if the keyboard has been created @@ -388,7 +389,7 @@ * Enable keyboard translation. Must be called after the keyboard is created, * and keyboard buffering must be enabled. */ - public static void enableTranslation() throws Exception { + public static void enableTranslation() throws LWJGLErrorException { if (!created) throw new IllegalStateException("Keyboard must be created before you can read events"); if (readBuffer == null) @@ -400,12 +401,12 @@ /** * Native method to enable the translation buffer */ - private static native void nEnableTranslation() throws Exception; + private static native void nEnableTranslation() throws LWJGLErrorException; /** * Enable keyboard buffering. Must be called after the keyboard is created. */ - public static void enableBuffer() throws Exception { + public static void enableBuffer() throws LWJGLErrorException { if (!created) throw new IllegalStateException("Keyboard must be created before you can enable buffering"); readBuffer = BufferUtils.createByteBuffer(4*BUFFER_SIZE); @@ -418,7 +419,7 @@ * @return the event buffer, * or null if no buffer can be allocated */ - private static native void nEnableBuffer() throws Exception; + private static native void nEnableBuffer() throws LWJGLErrorException; /** * Checks to see if a key is down. Index: Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- Mouse.java 27 Mar 2004 13:48:57 -0000 1.44 +++ Mouse.java 27 Mar 2004 14:42:46 -0000 1.45 @@ -39,6 +39,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.Sys; import org.lwjgl.opengl.Window; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -164,9 +165,9 @@ * * @param cursor the native cursor object to bind. May be null. * @return The previous Cursor object set, or null. - * @throws Exception if the cursor could not be set for any reason + * @throws LWJGLErrorException if the cursor could not be set for any reason */ - public static Cursor setNativeCursor(Cursor cursor) throws Exception { + public static Cursor setNativeCursor(Cursor cursor) throws LWJGLErrorException { if (!created) throw new IllegalStateException("Create the Mouse before setting the native cursor"); if ((getNativeCursorCaps() & CURSOR_ONE_BIT_TRANSPARENCY) == 0) @@ -183,7 +184,7 @@ } /** Native method to set the native cursor */ - private static native void nSetNativeCursor(long handle) throws Exception; + private static native void nSetNativeCursor(long handle) throws LWJGLErrorException; /** * Gets the minimum size of a native cursor. Can only be called if @@ -238,9 +239,9 @@ /** * "Create" the mouse. The display must first have been created. * - * @throws Exception if the mouse could not be created for any reason + * @throws LWJGLErrorException if the mouse could not be created for any reason */ - public static void create() throws Exception { + public static void create() throws LWJGLErrorException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created prior to creating mouse"); @@ -293,7 +294,7 @@ if (currentCursor != null) { try { setNativeCursor(null); - } catch (Exception e) { + } catch (LWJGLErrorException e) { if (Sys.DEBUG) e.printStackTrace(); } @@ -401,7 +402,7 @@ /** * Enable mouse button buffering. Must be called after the mouse is created. */ - public static void enableBuffer() throws Exception { + public static void enableBuffer() throws LWJGLErrorException { if (!created) throw new IllegalStateException("Mouse must be created before you can enable buffering"); readBuffer = BufferUtils.createByteBuffer(2*BUFFER_SIZE); @@ -414,7 +415,7 @@ * @return the event buffer, * or null if no buffer can be allocated */ - private static native void nEnableBuffer() throws Exception; + private static native void nEnableBuffer() throws LWJGLErrorException; /** * Reads all button events since last read. @@ -545,7 +546,7 @@ currentCursor.nextCursor(); try { setNativeCursor(currentCursor); - } catch (Exception e) { + } catch (LWJGLErrorException e) { if (Sys.DEBUG) e.printStackTrace(); } |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:56:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/java/org/lwjgl/openal Modified Files: AL.java ALC.java Log Message: Added LWJGLErrorException to replace the too general Exception Index: AL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- AL.java 27 Mar 2004 13:48:58 -0000 1.19 +++ AL.java 27 Mar 2004 14:42:46 -0000 1.20 @@ -37,6 +37,7 @@ import org.lwjgl.Display; import org.lwjgl.Sys; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -86,7 +87,7 @@ * @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; + protected static native void nCreate(String[] oalPaths) throws LWJGLErrorException; /** * Native method the destroy the AL @@ -101,17 +102,17 @@ } /** - * 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 - * supplied. - * - * @param deviceArguments Arguments supplied to native device - * @param contextFrequency Frequency for mixing output buffer, in units of Hz (Common values include 11025, 22050, and 44100). - * @param contextRefresh Refresh intervalls, in units of Hz. - * @param contextSynchronized Flag, indicating a synchronous context.* + * 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 + * supplied. + * + * @param deviceArguments Arguments supplied to native device + * @param contextFrequency Frequency for mixing output buffer, in units of Hz (Common values include 11025, 22050, and 44100). + * @param contextRefresh Refresh intervalls, in units of Hz. + * @param contextSynchronized Flag, indicating a synchronous context.* */ public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized) - throws OpenALException { + throws LWJGLErrorException { if (created) { return; @@ -130,7 +131,7 @@ * Creates an OpenAL instance. The empty create will cause OpenAL to * open the default device, and create a context using default values. */ - public static void create() throws OpenALException { + public static void create() throws LWJGLErrorException { if(created) { return; } @@ -151,7 +152,7 @@ jwsLibname = "openal"; break; default: - throw new OpenALException("Unknown platform"); + throw new LWJGLErrorException("Unknown platform"); } String jwsPath = getPathFromJWS(jwsLibname); Index: ALC.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALC.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ALC.java 27 Mar 2004 13:48:58 -0000 1.15 +++ ALC.java 27 Mar 2004 14:42:46 -0000 1.16 @@ -35,6 +35,7 @@ import java.nio.IntBuffer; import org.lwjgl.Sys; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -158,9 +159,9 @@ /** * Creates the ALC instance * - * @throws Exception if a failiure occured in the ALC creation process + * @throws LWJGLErrorException if a failiure occured in the ALC creation process */ - protected static void create() throws OpenALException { + protected static void create() throws LWJGLErrorException { if (created) { return; } |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:56:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/native/common Modified Files: common_tools.cpp extal.cpp Log Message: Added LWJGLErrorException to replace the too general Exception Index: extal.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- extal.cpp 10 Mar 2004 08:42:39 -0000 1.18 +++ extal.cpp 27 Mar 2004 14:42:47 -0000 1.19 @@ -197,7 +197,7 @@ } env->ReleaseStringUTFChars(path, path_str); } - throwOpenALException(env, "Could not load openal library."); + throwException(env, "Could not load openal library."); return false; } @@ -235,27 +235,27 @@ alGetProcAddress = (alGetProcAddressPROC)extal_GetProcAddress("alGetProcAddress"); if (alGetProcAddress == NULL) { DeInitializeOpenAL(); - throwOpenALException(env, "Could not load alGetProcAddress function pointer."); + throwException(env, "Could not load alGetProcAddress function pointer."); return; } //load basic OpenAL functions if(!LoadAL(env)) { DeInitializeOpenAL(); - throwOpenALException(env, "Could not load OpenAL function pointers."); + throwException(env, "Could not load OpenAL function pointers."); return; } //load OpenAL context functions if(!LoadALC(env)) { DeInitializeOpenAL(); - throwOpenALException(env, "Could not load ALC function pointers."); + throwException(env, "Could not load ALC function pointers."); return; } //load OpenAL extensions if(!LoadALExtensions()) { DeInitializeOpenAL(); - throwOpenALException(env, "Could not load AL extension function pointers."); + throwException(env, "Could not load AL extension function pointers."); return; } } Index: common_tools.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- common_tools.cpp 27 Mar 2004 14:09:54 -0000 1.15 +++ common_tools.cpp 27 Mar 2004 14:42:47 -0000 1.16 @@ -120,7 +120,7 @@ } void throwException(JNIEnv * env, const char * err) { - throwGeneralException(env, "java/lang/Exception", err); + throwGeneralException(env, "org/lwjgl/LWJGLErrorException", err); } void doExtension(JNIEnv *env, jobject ext_set, const char *method_name, const char *ext) { |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:56:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/java/org/lwjgl/opengl Modified Files: Pbuffer.java Window.java Log Message: Added LWJGLErrorException to replace the too general Exception Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Pbuffer.java 27 Mar 2004 13:48:58 -0000 1.13 +++ Pbuffer.java 27 Mar 2004 14:42:46 -0000 1.14 @@ -33,6 +33,7 @@ package org.lwjgl.opengl; import org.lwjgl.Sys; +import org.lwjgl.LWJGLErrorException; import java.nio.IntBuffer; @@ -159,7 +160,7 @@ } /** - * Construct an instance of a Pbuffer. If this fails then an Exception will be thrown. The buffer is single-buffered. + * Construct an instance of a Pbuffer. If this fails then an LWJGLErrorException will be thrown. The buffer is single-buffered. * <p/> * NOTE: An OpenGL window must be created before a Pbuffer can be created. The Pbuffer will have its own context that shares * display lists and textures with the OpenGL window context, but it will have its own OpenGL state. Therefore, state changes @@ -182,7 +183,7 @@ * 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. * @param renderTexture */ - public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil, int samples, RenderTexture renderTexture) throws Exception { + public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil, int samples, RenderTexture renderTexture) throws LWJGLErrorException { this.width = width; this.height = height; @@ -240,7 +241,7 @@ int bpp, int alpha, int depth, int stencil, int samples, IntBuffer pixelFormatCaps, int pixelFormatCapsSize, - IntBuffer pBufferAttribs, int pBufferAttribsSize) throws Exception; + IntBuffer pBufferAttribs, int pBufferAttribsSize) throws LWJGLErrorException; /** * Destroys the Pbuffer. After this call, there will be no valid GL rendering context - regardless of whether this Pbuffer was Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- Window.java 27 Mar 2004 13:48:58 -0000 1.33 +++ Window.java 27 Mar 2004 14:42:46 -0000 1.34 @@ -52,6 +52,7 @@ import org.lwjgl.input.Controller; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; +import org.lwjgl.LWJGLErrorException; public final class Window { @@ -286,33 +287,33 @@ * buffer, probably no alpha buffer, and probably no multisampling. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title - * @throws Exception + * @throws LWJGLErrorException */ - public static void create(String title) throws Exception { + public static void create(String title) throws LWJGLErrorException { create(title, Display.getDepth(), 0, 16, 8, 0); } /** * Create a fullscreen window. If the underlying OS does not * support fullscreen mode, then a window will be created instead. If this - * fails too then an Exception will be thrown. + * fails too then an LWJGLErrorException will be thrown. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title The title of the window * @param bpp Minimum bits per pixel * @param alpha Minimum bits per pixel in alpha buffer * @param depth Minimum bits per pixel in depth buffer * @param stencil Minimum bits per pixel in stencil buffer - * @throws Exception if the window could not be created for any reason; typically because + * @throws LWJGLErrorException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int bpp, int alpha, int depth, int stencil) throws Exception { + public static void create(String title, int bpp, int alpha, int depth, int stencil) throws LWJGLErrorException { create(title, bpp, alpha, depth, stencil, 0); } /** * Create a fullscreen window. If the underlying OS does not * support fullscreen mode, then a window will be created instead. If this - * fails too then an Exception will be thrown. + * fails too then an LWJGLErrorException will be thrown. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title The title of the window * @param bpp Minimum bits per pixel @@ -321,10 +322,10 @@ * @param stencil Minimum bits per pixel in stencil buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws Exception if the window could not be created for any reason; typically because + * @throws LWJGLErrorException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int bpp, int alpha, int depth, int stencil, int samples) throws Exception { + public static void create(String title, int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLErrorException { if (isCreated()) throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); Window.fullscreen = true; @@ -338,7 +339,7 @@ /** * Create a window. If the underlying OS does not have "floating" windows, then a fullscreen - * display will be created instead. If this fails too then an Exception will be thrown. + * display will be created instead. If this fails too then an LWJGLErrorException will be thrown. * If the window is created fullscreen, then its size may not match the specified size * here. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. @@ -352,16 +353,16 @@ * @param depth Minimum bits per pixel in depth buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws Exception if the window could not be created for any reason; typically because + * @throws LWJGLErrorException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) throws Exception { + public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) throws LWJGLErrorException { create(title, x, y, width, height, bpp, alpha, depth, stencil, 0); } /** * Create a window. If the underlying OS does not have "floating" windows, then a fullscreen - * display will be created instead. If this fails too then an Exception will be thrown. + * display will be created instead. If this fails too then an LWJGLErrorException will be thrown. * If the window is created fullscreen, then its size may not match the specified size * here. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. @@ -376,11 +377,11 @@ * @param stencil Minimum bits per pixel in stencil buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws Exception if the window could not be created for any reason; typically because + * @throws LWJGLErrorException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil, int samples) - throws Exception { + throws LWJGLErrorException { if (isCreated()) throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); Window.fullscreen = false; @@ -394,7 +395,7 @@ /** * Create the native window peer. - * @throws Exception + * @throws LWJGLErrorException */ private static native void nCreate( String title, @@ -408,9 +409,9 @@ int depth, int stencil, int samples) - throws Exception; + throws LWJGLErrorException; - private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws Exception { + private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLErrorException { nCreate(title, x, y, width, height, fullscreen, bpp, alpha, depth, stencil, samples); context = new Window(); makeCurrent(); @@ -430,7 +431,7 @@ Mouse.create(); createdMouse = true; Mouse.enableBuffer(); - } catch (Exception e) { + } catch (LWJGLErrorException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { @@ -444,7 +445,7 @@ createdKeyboard = true; Keyboard.enableBuffer(); Keyboard.enableTranslation(); - } catch (Exception e) { + } catch (LWJGLErrorException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { @@ -456,7 +457,7 @@ try { Controller.create(); createdController = true; - } catch (Exception e) { + } catch (LWJGLErrorException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:30:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27652/src/native/macosx Modified Files: hid.cpp org_lwjgl_Sys.cpp Log Message: Implemented version check to check for incompatible native libraries Index: hid.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/hid.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- hid.cpp 29 Jan 2004 20:53:00 -0000 1.6 +++ hid.cpp 27 Mar 2004 14:09:55 -0000 1.7 @@ -202,7 +202,7 @@ long usage_page; if (getDictLong(dev_props, CFSTR(kIOHIDPrimaryUsageKey), &usage) && getDictLong(dev_props, CFSTR(kIOHIDPrimaryUsagePageKey), &usage_page)) { - if (ISDEBUGENABLED()) { + if (isDebugEnabled()) { printf("Considering device '"); printProperty(dev_props, CFSTR(kIOHIDProductKey)); printf("', usage page %ld usage %ld\n", usage_page, usage); Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Sys.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- org_lwjgl_Sys.cpp 20 Dec 2003 22:23:15 -0000 1.13 +++ org_lwjgl_Sys.cpp 27 Mar 2004 14:09:55 -0000 1.14 @@ -88,6 +88,10 @@ return hires_timer; } +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getNativeLibraryVersion(JNIEnv *env, jclass clazz) { + return getVersionString(env); +} + /* * Class: org_lwjgl_Sys * Method: setTime |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:29:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27652/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: Implemented version check to check for incompatible native libraries Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- org_lwjgl_Sys.cpp 23 Feb 2004 23:42:57 -0000 1.22 +++ org_lwjgl_Sys.cpp 27 Mar 2004 14:09:55 -0000 1.23 @@ -65,6 +65,10 @@ setDebugEnabled(enabled == JNI_TRUE ? true : false); } +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getNativeLibraryVersion(JNIEnv *env, jclass clazz) { + return getVersionString(env); +} + /* * Class: org_lwjgl_Sys * Method: getTime |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:00:41
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24895/src/java/org/lwjgl/openal/eax Modified Files: EAX.java EAXBufferProperties.java EAXListenerProperties.java Log Message: All classes use Sys.initialize now Index: EAX.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAX.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- EAX.java 26 Feb 2004 21:51:57 -0000 1.7 +++ EAX.java 27 Mar 2004 13:48:58 -0000 1.8 @@ -29,7 +29,10 @@ * 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; + +package org.lwjgl.openal.eax; + +import org.lwjgl.Sys; /** * $Id$ @@ -40,65 +43,57 @@ * @version $Revision$ */ public class EAX { + /** Has the EAX object been created? */ + protected static boolean created; + + static { + Sys.initialize(); + } - /** 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; - } + /** + * 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; - } + 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(); + /** + * 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(); - } + /** + * "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 + /** + * Native method the destroy the EAX + */ + protected static native void nDestroy(); + + /** + * @return true if EAX has been created + */ + public static boolean isCreated() { + return created; + } +} Index: EAXListenerProperties.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAXListenerProperties.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- EAXListenerProperties.java 26 Feb 2004 21:51:57 -0000 1.11 +++ EAXListenerProperties.java 27 Mar 2004 13:48:58 -0000 1.12 @@ -34,6 +34,8 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; +import org.lwjgl.Sys; + /** * $Id$ * @@ -43,647 +45,647 @@ * @version $Revision$ */ [...1193 lines suppressed...] - /** - * Retrieves the size of the EAXLISTENERPROPERTIES - */ - protected static native int sizeOfEaxListenerProperties(); + /** + * Retrieves the size of the EAXLISTENERPROPERTIES + */ + protected static native int sizeOfEaxListenerProperties(); - /** - * Sets the offsets to the fields - */ - protected static native void assignOffsets(); -} \ No newline at end of file + /** + * Sets the offsets to the fields + */ + protected static native void assignOffsets(); +} Index: EAXBufferProperties.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAXBufferProperties.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- EAXBufferProperties.java 26 Feb 2004 21:51:57 -0000 1.12 +++ EAXBufferProperties.java 27 Mar 2004 13:48:58 -0000 1.13 @@ -34,6 +34,8 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; +import org.lwjgl.Sys; + /** * $Id$ * @@ -45,594 +47,594 @@ * @version $Revision$ */ [...1099 lines suppressed...] + } + + // -------------------------------------------------------------------------- + + /** + * Retrieves the size of the EAXBUFFERPROPERTIES + */ + protected static native int sizeOfEaxBufferProperties(); - /** - * Sets the offsets to the fields - */ - protected static native void assignOffsets(); -} \ No newline at end of file + /** + * Sets the offsets to the fields + */ + protected static native void assignOffsets(); +} |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:00:39
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24895/src/java/org/lwjgl/opengl Modified Files: GLContext.java Pbuffer.java Window.java Log Message: All classes use Sys.initialize now Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Pbuffer.java 7 Mar 2004 16:01:44 -0000 1.12 +++ Pbuffer.java 27 Mar 2004 13:48:58 -0000 1.13 @@ -155,7 +155,7 @@ private final int height; static { - System.loadLibrary(Sys.getLibraryName()); + Sys.initialize(); } /** Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Window.java 27 Mar 2004 11:55:07 -0000 1.32 +++ Window.java 27 Mar 2004 13:48:58 -0000 1.33 @@ -56,7 +56,7 @@ public final class Window { static { - System.loadLibrary(Sys.getLibraryName()); + Sys.initialize(); } /** X coordinate of the window */ Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- GLContext.java 18 Mar 2004 22:00:09 -0000 1.7 +++ GLContext.java 27 Mar 2004 13:48:58 -0000 1.8 @@ -167,7 +167,7 @@ public static boolean OpenGL15; static { - System.loadLibrary(Sys.getLibraryName()); + Sys.initialize(); } /** |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:00:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24895/src/java/org/lwjgl/input Modified Files: Controller.java Cursor.java Keyboard.java Mouse.java Log Message: All classes use Sys.initialize now Index: Controller.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Controller.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Controller.java 27 Mar 2004 11:55:06 -0000 1.13 +++ Controller.java 27 Mar 2004 13:48:57 -0000 1.14 @@ -146,7 +146,9 @@ * Static initialization */ private static void initialize() { - System.loadLibrary(Sys.getLibraryName()); + if (initialized) + return; + Sys.initialize(); initIDs(); // Assign names to all the buttons @@ -166,9 +168,7 @@ public static void create() throws Exception { if (!Window.isCreated()) throw new IllegalStateException("Window must be created before you can create Controller"); - if (!initialized) { - initialize(); - } + initialize(); if (created) { return; Index: Cursor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Cursor.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Cursor.java 27 Mar 2004 11:55:06 -0000 1.17 +++ Cursor.java 27 Mar 2004 13:48:57 -0000 1.18 @@ -49,10 +49,6 @@ */ public class Cursor { - - /** Lazy initialization */ - private static boolean initialized = false; - /** First element to display */ private CursorElement[] cursors = null; @@ -86,10 +82,7 @@ if (yHotspot >= height || yHotspot < 0) throw new IllegalArgumentException("yHotspot > height || yHotspot < 0"); - // initialize - if (!initialized) { - initialize(); - } + Sys.initialize(); // Hmm yHotspot = height - 1 - yHotspot; @@ -99,14 +92,6 @@ } /** - * Initializes the cursor class - */ - private static void initialize() { - System.loadLibrary(Sys.getLibraryName()); - initialized = true; - } - - /** * Creates the actual cursor, using a platform specific class */ private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws Exception { Index: Keyboard.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Keyboard.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- Keyboard.java 27 Mar 2004 11:55:06 -0000 1.41 +++ Keyboard.java 27 Mar 2004 13:48:57 -0000 1.42 @@ -268,7 +268,9 @@ * Static initialization */ private static void initialize() { - System.loadLibrary(Sys.getLibraryName()); + if (initialized) + return; + Sys.initialize(); initIDs(); initialized = true; } Index: Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Mouse.java 27 Mar 2004 11:55:06 -0000 1.43 +++ Mouse.java 27 Mar 2004 13:48:57 -0000 1.44 @@ -217,7 +217,7 @@ * Static initialization */ private static void initialize() { - System.loadLibrary(Sys.getLibraryName()); + Sys.initialize(); initIDs(); // Assign names to all the buttons @@ -245,9 +245,7 @@ if (!Window.isCreated()) throw new IllegalStateException("Window must be created prior to creating mouse"); - if (!initialized) { - initialize(); - } + initialize(); if (created) { return; } |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:00:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24895/src/java/org/lwjgl/openal Modified Files: AL.java ALC.java Log Message: All classes use Sys.initialize now Index: AL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- AL.java 8 Mar 2004 15:21:10 -0000 1.18 +++ AL.java 27 Mar 2004 13:48:58 -0000 1.19 @@ -77,14 +77,7 @@ protected static boolean created; static { - initialize(); - } - - /** - * Static initialization - */ - private static void initialize() { - System.loadLibrary(org.lwjgl.Sys.getLibraryName()); + Sys.initialize(); } /** Index: ALC.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALC.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- ALC.java 9 Mar 2004 11:03:08 -0000 1.14 +++ ALC.java 27 Mar 2004 13:48:58 -0000 1.15 @@ -34,6 +34,8 @@ import java.nio.Buffer; import java.nio.IntBuffer; +import org.lwjgl.Sys; + /** * $Id$ * @@ -140,7 +142,7 @@ public static final int ALC_OUT_OF_MEMORY = 0xA005; static { - initialize(); + Sys.initialize(); } /** Creates a new instance of ALC */ @@ -154,13 +156,6 @@ } /** - * Static initialization - */ - private static void initialize() { - System.loadLibrary(org.lwjgl.Sys.getLibraryName()); - } - - /** * Creates the ALC instance * * @throws Exception if a failiure occured in the ALC creation process |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:00:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24895/src/java/org/lwjgl Modified Files: Display.java Sys.java Log Message: All classes use Sys.initialize now Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- Display.java 27 Mar 2004 11:55:05 -0000 1.41 +++ Display.java 27 Mar 2004 13:48:57 -0000 1.42 @@ -75,7 +75,7 @@ public static final int PLATFORM_AGL = 2; static { - System.loadLibrary(Sys.getLibraryName()); + Sys.initialize(); init(); Sys.log("Adapter: "+getAdapter()+" Version: "+getVersion()); } Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Sys.java 7 Mar 2004 15:20:28 -0000 1.42 +++ Sys.java 27 Mar 2004 13:48:57 -0000 1.43 @@ -87,6 +87,8 @@ */ public static final boolean DEBUG = Boolean.getBoolean("org.lwjgl.Sys.debug"); + private static boolean initialized = false; + static { initialize(); @@ -123,7 +125,10 @@ /** * Initialization. */ - private static void initialize() { + public static void initialize() { + if (initialized) + return; + initialized = true; System.loadLibrary(LIBRARY_NAME); setDebug(DEBUG); setTime(0); |
|
From: Elias N. <eli...@us...> - 2004-03-27 12:06:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6869/src/java/org/lwjgl/input Modified Files: Controller.java Cursor.java Keyboard.java Mouse.java Log Message: Replaced asserts with proper runtime exceptions Index: Controller.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Controller.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Controller.java 26 Mar 2004 10:58:49 -0000 1.12 +++ Controller.java 27 Mar 2004 11:55:06 -0000 1.13 @@ -164,9 +164,8 @@ * @throws Exception if the controller could not be created for any reason */ public static void create() throws Exception { - - assert Window.isCreated() : "Window must be created prior to creating controller"; - + if (!Window.isCreated()) + throw new IllegalStateException("Window must be created before you can create Controller"); if (!initialized) { initialize(); } @@ -203,7 +202,8 @@ * Polls the controller. */ public static void poll() { - assert created : "The controller has not been created."; + if (!created) + throw new IllegalStateException("Controller must be created before you can poll the device"); nPoll(); } @@ -215,7 +215,8 @@ * @see #buttonCount */ public static boolean isButtonDown(int button) { - assert created : "The controller has not been created."; + if (!created) + throw new IllegalStateException("Controller must be created before you can query button state"); return buttons[button]; } @@ -231,7 +232,7 @@ * it always throws a RuntimeException. */ public static void read() { - throw new RuntimeException("Buffering is not implemented for Controllers."); + throw new UnsupportedOperationException("Buffering is not implemented for Controllers."); } /** Index: Cursor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Cursor.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Cursor.java 21 Mar 2004 21:54:55 -0000 1.16 +++ Cursor.java 27 Mar 2004 11:55:06 -0000 1.17 @@ -50,185 +50,190 @@ public class Cursor { - /** Lazy initialization */ - private static boolean initialized = false; - - /** First element to display */ - private CursorElement[] cursors = null; - - /** Index into list of cursors */ - private int index = -1; - - /** - * Constructs a new Cursor, with the given parameters. Mouse must have been created before you can create - * Cursor objects. Cursor images are in ARGB format, but only one bit transparancy is guaranteed to be supported. - * So to maximize portability, lwjgl applications should only create cursor images with 0x00 or 0xff as alpha values. - * The constructor will copy the images and delays, so there's no need to keep them around. - * - * @param width cursor image width - * @param height cursor image height - * @param xHotspot the x coordinate of the cursor hotspot - * @param yHotspot the y coordinate of the cursor hotspot - * @param numImages number of cursor images specified. Must be 1 if animations are not supported. - * @param images A buffer containing the images. The origin is at the lower left corner, like OpenGL. - * @param delays An int buffer of animation frame delays, if numImages is greater than 1, else null - * @throws Exception if the cursor could not be created for any reason - */ - public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws Exception { - assert Mouse.isCreated(); - assert width*height*numImages <= images.remaining() : "width*height*numImages > images.remaining()"; - assert delays == null || numImages <= delays.remaining() : "delays != null && numImages > delays.remaining()"; - assert xHotspot < width && xHotspot >= 0 : "xHotspot > width || xHotspot < 0"; - assert yHotspot < height && yHotspot >= 0 : "yHotspot > height || yHotspot < 0"; - - // initialize - if (!initialized) { - initialize(); - } - - // Hmm - yHotspot = height - 1 - yHotspot; - - // create cursor (or cursors if multiple images supplied) - createCursors(width, height, xHotspot, yHotspot, numImages, images, delays); - } - - /** - * Initializes the cursor class - */ - private static void initialize() { - System.loadLibrary(Sys.getLibraryName()); - initialized = true; - } + /** Lazy initialization */ + private static boolean initialized = false; + + /** First element to display */ + private CursorElement[] cursors = null; + + /** Index into list of cursors */ + private int index = -1; + + /** + * Constructs a new Cursor, with the given parameters. Mouse must have been created before you can create + * Cursor objects. Cursor images are in ARGB format, but only one bit transparancy is guaranteed to be supported. + * So to maximize portability, lwjgl applications should only create cursor images with 0x00 or 0xff as alpha values. + * The constructor will copy the images and delays, so there's no need to keep them around. + * + * @param width cursor image width + * @param height cursor image height + * @param xHotspot the x coordinate of the cursor hotspot + * @param yHotspot the y coordinate of the cursor hotspot + * @param numImages number of cursor images specified. Must be 1 if animations are not supported. + * @param images A buffer containing the images. The origin is at the lower left corner, like OpenGL. + * @param delays An int buffer of animation frame delays, if numImages is greater than 1, else null + * @throws Exception if the cursor could not be created for any reason + */ + public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws Exception { + if (!Mouse.isCreated()) + throw new IllegalStateException("Mouse must be created before creating cursor objects"); + if (width*height*numImages > images.remaining()) + throw new IllegalArgumentException("width*height*numImages > images.remaining()"); + if (delays != null && numImages > delays.remaining()) + throw new IllegalArgumentException("delays != null && numImages > delays.remaining()"); + if (xHotspot >= width || xHotspot < 0) + throw new IllegalArgumentException("xHotspot > width || xHotspot < 0"); + if (yHotspot >= height || yHotspot < 0) + throw new IllegalArgumentException("yHotspot > height || yHotspot < 0"); + + // initialize + if (!initialized) { + initialize(); + } + + // Hmm + yHotspot = height - 1 - yHotspot; + + // create cursor (or cursors if multiple images supplied) + createCursors(width, height, xHotspot, yHotspot, numImages, images, delays); + } + + /** + * Initializes the cursor class + */ + private static void initialize() { + System.loadLibrary(Sys.getLibraryName()); + initialized = true; + } - /** - * Creates the actual cursor, using a platform specific class - */ - private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws Exception { - // create copy and flip images to match ogl - IntBuffer images_copy = ByteBuffer.allocateDirect(images.remaining()*4).order(ByteOrder.nativeOrder()).asIntBuffer(); - flipImages(width, height, numImages, images, images_copy); - - // create our cursor elements - cursors = new CursorElement[numImages]; - for(int i=0; i<numImages; i++) { - cursors[i] = new CursorElement(); - cursors[i].cursorHandle = nCreateCursor(width, height, xHotspot, yHotspot, 1, images_copy, images_copy.position()); - cursors[i].delay = (delays != null) ? delays.get(i) : 0; - cursors[i].timeout = System.currentTimeMillis(); - - // offset to next image - images_copy.position(width*height*(i+1)); - } - - // set index - index = 0; - } + /** + * Creates the actual cursor, using a platform specific class + */ + private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws Exception { + // create copy and flip images to match ogl + IntBuffer images_copy = ByteBuffer.allocateDirect(images.remaining()*4).order(ByteOrder.nativeOrder()).asIntBuffer(); + flipImages(width, height, numImages, images, images_copy); + + // create our cursor elements + cursors = new CursorElement[numImages]; + for(int i=0; i<numImages; i++) { + cursors[i] = new CursorElement(); + cursors[i].cursorHandle = nCreateCursor(width, height, xHotspot, yHotspot, 1, images_copy, images_copy.position()); + cursors[i].delay = (delays != null) ? delays.get(i) : 0; + cursors[i].timeout = System.currentTimeMillis(); + + // offset to next image + images_copy.position(width*height*(i+1)); + } + + // set index + index = 0; + } - - /** - * Flips the images so they're oriented according to opengl - * - * @param width Width of image - * @param height Height of images - * @param numImages How many images to flip - * @param images Source images - * @param images_copy Destination images - */ - private static void flipImages(int width, int height, int numImages, IntBuffer images, IntBuffer images_copy) { - for (int i = 0; i < numImages; i++) { - int start_index = i*width*height; - flipImage(width, height, start_index, images, images_copy); - } - } + + /** + * Flips the images so they're oriented according to opengl + * + * @param width Width of image + * @param height Height of images + * @param numImages How many images to flip + * @param images Source images + * @param images_copy Destination images + */ + private static void flipImages(int width, int height, int numImages, IntBuffer images, IntBuffer images_copy) { + for (int i = 0; i < numImages; i++) { + int start_index = i*width*height; + flipImage(width, height, start_index, images, images_copy); + } + } - /** - * @param width Width of image - * @param height Height of images - * @param start_index index into source buffer to copy to - * @param images Source images - * @param images_copy Destination images - */ - private static void flipImage(int width, int height, int start_index, IntBuffer images, IntBuffer images_copy) { - for (int y = 0; y < height>>1; y++) { - int index_y_1 = y*width + start_index; - int index_y_2 = (height - y - 1)*width + start_index; - for (int x = 0; x < width; x++) { - int index1 = index_y_1 + x; - int index2 = index_y_2 + x; - int temp_pixel = images.get(index1 + images.position()); - images_copy.put(index1, images.get(index2 + images.position())); - images_copy.put(index2, temp_pixel); - } - } - } - - /** - * Gets the native handle associated with the cursor object. - */ - public long getHandle() { - return cursors[index].cursorHandle; - } - - /** - * Destroy the native cursor. Cursor must not be current. - */ - public void destroy() { + /** + * @param width Width of image + * @param height Height of images + * @param start_index index into source buffer to copy to + * @param images Source images + * @param images_copy Destination images + */ + private static void flipImage(int width, int height, int start_index, IntBuffer images, IntBuffer images_copy) { + for (int y = 0; y < height>>1; y++) { + int index_y_1 = y*width + start_index; + int index_y_2 = (height - y - 1)*width + start_index; + for (int x = 0; x < width; x++) { + int index1 = index_y_1 + x; + int index2 = index_y_2 + x; + int temp_pixel = images.get(index1 + images.position()); + images_copy.put(index1, images.get(index2 + images.position())); + images_copy.put(index2, temp_pixel); + } + } + } + + /** + * Gets the native handle associated with the cursor object. + */ + public long getHandle() { + return cursors[index].cursorHandle; + } + + /** + * Destroy the native cursor. Cursor must not be current. + */ + public void destroy() { for(int i=0; i<cursors.length; i++) { - nDestroyCursor(cursors[i].cursorHandle); - } - } + nDestroyCursor(cursors[i].cursorHandle); + } + } - /** - * Sets the timout property to the time it should be changed - */ - protected void setTimeout() { - cursors[index].timeout = System.currentTimeMillis() + cursors[index].delay; - } + /** + * Sets the timout property to the time it should be changed + */ + protected void setTimeout() { + cursors[index].timeout = System.currentTimeMillis() + cursors[index].delay; + } - /** - * Determines whether this cursor has timed out - * @return true if the this cursor has timed out, false if not - */ - protected boolean hasTimedOut() { - return cursors.length > 1 && cursors[index].timeout < System.currentTimeMillis(); - } + /** + * Determines whether this cursor has timed out + * @return true if the this cursor has timed out, false if not + */ + protected boolean hasTimedOut() { + return cursors.length > 1 && cursors[index].timeout < System.currentTimeMillis(); + } - /** - * Changes to the next cursor - */ - protected void nextCursor() { - index = ++index % cursors.length; - } + /** + * Changes to the next cursor + */ + protected void nextCursor() { + index = ++index % cursors.length; + } - /** - * Resets the index of the cursor animation to the first in the list. - */ - public void resetAnimation() { - index = 0; - } - - /** - * Native method to create a native cursor - */ - private static native long nCreateCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, int images_offset); + /** + * Resets the index of the cursor animation to the first in the list. + */ + public void resetAnimation() { + index = 0; + } + + /** + * Native method to create a native cursor + */ + private static native long nCreateCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, int images_offset); - /** - * Native method to destroy a native cursor - */ - private static native void nDestroyCursor(long cursorHandle); - - /** - * A single cursor element, used when animating - */ - protected class CursorElement { - /** Handle to cursor */ - long cursorHandle; - - /** How long a delay this element should have */ - long delay; - - /** Absolute time this element times out */ - long timeout; - } + /** + * Native method to destroy a native cursor + */ + private static native void nDestroyCursor(long cursorHandle); + + /** + * A single cursor element, used when animating + */ + protected class CursorElement { + /** Handle to cursor */ + long cursorHandle; + + /** How long a delay this element should have */ + long delay; + + /** Absolute time this element times out */ + long timeout; + } } Index: Keyboard.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Keyboard.java,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- Keyboard.java 26 Mar 2004 21:57:56 -0000 1.40 +++ Keyboard.java 27 Mar 2004 11:55:06 -0000 1.41 @@ -285,7 +285,8 @@ * @throws Exception if the keyboard could not be created for any reason */ public static void create() throws Exception { - assert Window.isCreated() : "Window must be created prior to creating keyboard"; + if (!Window.isCreated()) + throw new IllegalStateException("Window must be created before you can create Keyboard"); if (!initialized) initialize(); if (created) @@ -334,7 +335,8 @@ * @see org.lwjgl.input.Keyboard#read() */ public static void poll() { - assert created : "The keyboard has not been created."; + if (!created) + throw new IllegalStateException("Keyboard must be created before you can poll the device"); nPoll(keyDownBuffer); } @@ -361,8 +363,10 @@ * @see org.lwjgl.input.Keyboard#getEventCharacter() */ public static void read() { - assert created : "The keyboard has not been created."; - assert readBuffer != null : "Keyboard buffering has not been enabled."; + if (!created) + throw new IllegalStateException("Keyboard must be created before you can read events"); + if (readBuffer == null) + throw new IllegalStateException("Event buffering must be enabled before you can read events"); readBuffer.compact(); int numEvents = nRead(readBuffer, readBuffer.position()); if (translationEnabled) @@ -383,8 +387,10 @@ * and keyboard buffering must be enabled. */ public static void enableTranslation() throws Exception { - assert created : "The keyboard has not been created."; - assert readBuffer != null : "Keyboard buffering has not been enabled."; + if (!created) + throw new IllegalStateException("Keyboard must be created before you can read events"); + if (readBuffer == null) + throw new IllegalStateException("Event buffering must be enabled before you can read events"); nEnableTranslation(); translationEnabled = true; } @@ -398,7 +404,8 @@ * Enable keyboard buffering. Must be called after the keyboard is created. */ public static void enableBuffer() throws Exception { - assert created : "The keyboard has not been created."; + if (!created) + throw new IllegalStateException("Keyboard must be created before you can enable buffering"); readBuffer = BufferUtils.createByteBuffer(4*BUFFER_SIZE); readBuffer.limit(0); nEnableBuffer(); @@ -417,7 +424,8 @@ * @return true if the key is down according to the last poll() */ public static boolean isKeyDown(int key) { - assert created : "The keyboard has not been created."; + if (!created) + throw new IllegalStateException("Keyboard must be created before you can query key state"); return keyDownBuffer.get(key) != 0; } @@ -442,7 +450,8 @@ * @return STATE_ON if on, STATE_OFF if off and STATE_UNKNOWN if the state is unknown */ public static int isStateKeySet(int key) { - assert created : "The keyboard has not been created."; + if (!created) + throw new IllegalStateException("Keyboard must be created before you can query key state"); return nisStateKeySet(key); } private static native int nisStateKeySet(int key); @@ -473,7 +482,8 @@ * @return the number of keyboard events */ public static int getNumKeyboardEvents() { - assert created : "The keyboard has not been created."; + if (!created) + throw new IllegalStateException("Keyboard must be created before you can read events"); if (translationEnabled) return readBuffer.remaining()/4; else @@ -492,8 +502,10 @@ * @return true if a keyboard event was read, false otherwise */ public static boolean next() { - assert created : "The keyboard has not been created."; - assert readBuffer != null : "Keyboard buffering has not been enabled."; + if (!created) + throw new IllegalStateException("Keyboard must be created before you can read events"); + if (readBuffer == null) + throw new IllegalStateException("Event buffering must be enabled before you can read events"); if (readBuffer.hasRemaining()) { eventKey = readBuffer.get() & 0xFF; Index: Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Mouse.java 26 Mar 2004 21:57:56 -0000 1.42 +++ Mouse.java 27 Mar 2004 11:55:06 -0000 1.43 @@ -167,7 +167,10 @@ * @throws Exception if the cursor could not be set for any reason */ public static Cursor setNativeCursor(Cursor cursor) throws Exception { - assert created && ((getNativeCursorCaps() | CURSOR_ONE_BIT_TRANSPARENCY) != 0); + if (!created) + throw new IllegalStateException("Create the Mouse before setting the native cursor"); + if ((getNativeCursorCaps() & CURSOR_ONE_BIT_TRANSPARENCY) == 0) + throw new IllegalStateException("Mouse doesn't support native cursors"); Cursor oldCursor = currentCursor; currentCursor = cursor; if (currentCursor != null) { @@ -239,7 +242,8 @@ */ public static void create() throws Exception { - assert Window.isCreated() : "Window must be created prior to creating mouse"; + if (!Window.isCreated()) + throw new IllegalStateException("Window must be created prior to creating mouse"); if (!initialized) { initialize(); @@ -327,7 +331,8 @@ * @see org.lwjgl.input.Mouse#read() */ public static void poll() { - assert created : "The mouse has not been created."; + if (!created) + throw new IllegalStateException("Mouse must be created before you can poll it"); nPoll(); // set absolute position @@ -363,7 +368,8 @@ * @return true if the specified button is down */ public static boolean isButtonDown(int button) { - assert created : "The mouse has not been created."; + if (!created) + throw new IllegalStateException("Mouse must be created before you can poll the button state"); if (button >= buttonCount || button < 0) return false; else @@ -398,7 +404,8 @@ * Enable mouse button buffering. Must be called after the mouse is created. */ public static void enableBuffer() throws Exception { - assert created : "The mouse has not been created."; + if (!created) + throw new IllegalStateException("Mouse must be created before you can enable buffering"); readBuffer = BufferUtils.createByteBuffer(2*BUFFER_SIZE); readBuffer.limit(0); nEnableBuffer(); @@ -424,8 +431,10 @@ * @see org.lwjgl.input.Mouse#getEventButtonState() */ public static void read() { - assert created : "The mouse has not been created."; - assert readBuffer != null : "Mouse buffering has not been enabled."; + if (!created) + throw new IllegalStateException("Mouse must be created before you can read events"); + if (readBuffer == null) + throw new IllegalStateException("Event buffering must be enabled before you can read events"); readBuffer.compact(); int numEvents = nRead(readBuffer, readBuffer.position()); readBuffer.position(readBuffer.position() + numEvents*2); @@ -447,8 +456,10 @@ * @return true if a mouse event was read, false otherwise */ public static boolean next() { - assert created : "The mouse has not been created."; - assert readBuffer != null : "Mouse buffering has not been enabled."; + if (!created) + throw new IllegalStateException("Mouse must be created before you can read events"); + if (readBuffer == null) + throw new IllegalStateException("Event buffering must be enabled before you can read events"); if (readBuffer.hasRemaining()) { eventButton = readBuffer.get() & 0xFF; |
|
From: Elias N. <eli...@us...> - 2004-03-27 12:06:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6869/src/java/org/lwjgl/opengl Modified Files: ARBVertexBufferObject.java ARBVertexShader.java ATIDrawBuffers.java GL15.java Window.java Log Message: Replaced asserts with proper runtime exceptions Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- Window.java 26 Mar 2004 11:09:39 -0000 1.31 +++ Window.java 27 Mar 2004 11:55:07 -0000 1.32 @@ -108,7 +108,8 @@ * @return the width of the window */ public static int getWidth() { - assert isCreated() : "Cannot get width on uncreated window"; + if (!isCreated()) + throw new IllegalStateException("Cannot get width on uncreated window"); return width; } @@ -116,7 +117,8 @@ * @return the height of the window */ public static int getHeight() { - assert isCreated() : "Cannot get height on uncreated window"; + if (!isCreated()) + throw new IllegalStateException("Cannot get height on uncreated window"); return height; } @@ -124,15 +126,17 @@ * @return the title of the window */ public static String getTitle() { - assert isCreated() : "Cannot get title on uncreated window"; + if (!isCreated()) + throw new IllegalStateException("Cannot get title on uncreated window"); return title; } - + /** * @return whether this window is in fullscreen mode */ public static boolean isFullscreen() { - assert isCreated() : "Cannot determine state of uncreated window"; + if (!isCreated()) + throw new IllegalStateException("Cannot determine fullscreen state of uncreated window"); return fullscreen; } @@ -141,7 +145,8 @@ * @param newTitle The new window title */ public static void setTitle(String newTitle) { - assert isCreated() : "Cannot set title of uncreated window"; + if (!isCreated()) + throw new IllegalStateException("Cannot set title on uncreated window"); title = newTitle; nSetTitle(title); } @@ -156,7 +161,8 @@ * @return true if the user or operating system has asked the window to close */ public static boolean isCloseRequested() { - assert isCreated() : "Cannot determine state of uncreated window"; + if (!isCreated()) + throw new IllegalStateException("Cannot determine close requested state of uncreated window"); return nIsCloseRequested(); } @@ -166,7 +172,8 @@ * @return true if the window is minimized or otherwise not visible */ public static boolean isMinimized() { - assert isCreated() : "Cannot determine state of uncreated window"; + if (!isCreated()) + throw new IllegalStateException("Cannot determine minimized state of uncreated window"); return nIsMinimized(); } @@ -176,7 +183,8 @@ * @return true if window is focused */ public static boolean isFocused() { - assert isCreated() : "Cannot determine state of uncreated window"; + if (!isCreated()) + throw new IllegalStateException("Cannot determine focused state of uncreated window"); return nIsFocused(); } @@ -210,7 +218,8 @@ * and needs to repaint itself */ public static boolean isDirty() { - assert isCreated() : "Cannot determine state of uncreated window"; + if (!isCreated()) + throw new IllegalStateException("Cannot determine dirty state of uncreated window"); return nIsDirty(); } @@ -222,7 +231,8 @@ * @throws OpenGLException if an OpenGL error has occured since the last call to GL11.glGetError() */ public static void update() { - assert isCreated() : "Cannot paint uncreated window"; + if (!isCreated()) + throw new IllegalStateException("Cannot determine update uncreated window"); nUpdate(); if ((isDirty() && !isMinimized()) || (isFocused() && !isMinimized())) { Util.checkGLError(); @@ -259,7 +269,8 @@ * Make the Window the current rendering context for GL calls. */ public static synchronized void makeCurrent() { - assert isCreated() : "No window has been created."; + if (!isCreated()) + throw new IllegalStateException("No window created to make current"); nMakeCurrent(); GLContext.useContext(context); } @@ -315,7 +326,7 @@ */ public static void create(String title, int bpp, int alpha, int depth, int stencil, int samples) throws Exception { if (isCreated()) - throw new Exception("Only one LWJGL window may be instantiated at any one time."); + throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); Window.fullscreen = true; Window.x = 0; Window.y = 0; @@ -371,7 +382,7 @@ public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil, int samples) throws Exception { if (isCreated()) - throw new Exception("Only one LWJGL window may be instantiated at any one time."); + throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); Window.fullscreen = false; Window.x = x; Window.y = y; @@ -518,7 +529,8 @@ * @return boolean */ public static boolean isVSyncEnabled() { - assert isCreated() : "Cannot determine sync of uncreated window"; + if (isCreated()) + throw new IllegalStateException("Cannot determine vsync state of uncreated window"); return nIsVSyncEnabled(); } @@ -531,11 +543,10 @@ * @param sync true to synchronize; false to ignore synchronization */ public static void setVSyncEnabled(boolean sync) { - assert isCreated() : "Cannot set sync of uncreated window"; + if (isCreated()) + throw new IllegalStateException("Cannot set vsync state of uncreated window"); nSetVSyncEnabled(sync); } private static native void nSetVSyncEnabled(boolean sync); - - } Index: ARBVertexShader.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexShader.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ARBVertexShader.java 15 Mar 2004 16:31:09 -0000 1.4 +++ ARBVertexShader.java 27 Mar 2004 11:55:07 -0000 1.5 @@ -67,7 +67,7 @@ // --------------------------- public static void glBindAttribLocationARB(int programObj, int index, ByteBuffer name) { if ( name.get(name.limit() - 1) != 0 ) { - throw new RuntimeException("<name> must be a null-terminated string."); + throw new IllegalArgumentException("<name> must be a null-terminated string."); } nglBindAttribLocationARB(programObj, index, name, name.position()); } @@ -99,7 +99,7 @@ // --------------------------- public static int glGetAttribLocationARB(int programObj, ByteBuffer name) { if ( name.get(name.limit() - 1) != 0 ) { - throw new RuntimeException("<name> must be a null-terminated string."); + throw new IllegalArgumentException("<name> must be a null-terminated string."); } return nglGetAttribLocationARB(programObj, name, name.position()); } @@ -107,4 +107,4 @@ private static native int nglGetAttribLocationARB(int programObj, ByteBuffer name, int nameOffset); // --------------------------- -} \ No newline at end of file +} Index: ATIDrawBuffers.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIDrawBuffers.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ATIDrawBuffers.java 18 Feb 2004 23:54:45 -0000 1.3 +++ ATIDrawBuffers.java 27 Mar 2004 11:55:07 -0000 1.4 @@ -68,7 +68,7 @@ // --------------------------- public static void glDrawBuffersATI(IntBuffer buffers) { if (buffers.remaining() == 0) { - throw new RuntimeException("<buffers> must have at least 1 integer available."); + throw new IllegalArgumentException("<buffers> must have at least 1 integer available."); } nglDrawBuffersATI(buffers.remaining(), buffers, buffers.position()); } @@ -76,4 +76,4 @@ private static native void nglDrawBuffersATI(int size, IntBuffer buffers, int buffersOffset); // --------------------------- -} \ No newline at end of file +} Index: GL15.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL15.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- GL15.java 18 Feb 2004 23:54:46 -0000 1.3 +++ GL15.java 27 Mar 2004 11:55:07 -0000 1.4 @@ -87,7 +87,7 @@ VBOTracker.getVBOArrayStack().setState(buffer); break; default: - assert false: "Unsupported VBO target " + target; + throw new IllegalArgumentException("Unsupported VBO target " + target); } nglBindBuffer(target, buffer); } @@ -296,4 +296,4 @@ int paramsOffset); // --------------------------- -} \ No newline at end of file +} Index: ARBVertexBufferObject.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexBufferObject.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ARBVertexBufferObject.java 18 Feb 2004 23:54:45 -0000 1.3 +++ ARBVertexBufferObject.java 27 Mar 2004 11:55:07 -0000 1.4 @@ -89,7 +89,7 @@ case GL_ARRAY_BUFFER_ARB: VBOTracker.getVBOArrayStack().setState(buffer); break; - default: assert false: "Unsupported VBO target " + target; + default: throw new IllegalArgumentException("Unsupported VBO target " + target); } nglBindBufferARB(target, buffer); } |
|
From: Elias N. <eli...@us...> - 2004-03-27 12:06:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6869/src/java/org/lwjgl/openal Modified Files: AL10.java Log Message: Replaced asserts with proper runtime exceptions Index: AL10.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL10.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- AL10.java 9 Mar 2004 11:03:08 -0000 1.2 +++ AL10.java 27 Mar 2004 11:55:06 -0000 1.3 @@ -44,321 +44,321 @@ * @version $Revision$ */ public final class AL10 { - - /** Bad value */ - public static final int AL_INVALID = -1; + + /** Bad value */ + public static final int AL_INVALID = -1; - /** Disable value */ [...1756 lines suppressed...] + * abs(vs) is greater or equal VD. + * </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); |