You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
|
3
|
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
|
11
|
12
|
13
|
14
|
15
(1) |
16
(21) |
17
(5) |
|
18
(5) |
19
(14) |
20
(5) |
21
|
22
|
23
(2) |
24
(18) |
|
25
(3) |
26
(22) |
27
(8) |
28
(10) |
29
(11) |
30
(9) |
31
|
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 21:35:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector In directory usw-pr-cvs1:/tmp/cvs-serv14858/src/java/org/lwjgl/vector Modified Files: Matrix4f.java Matrix3f.java Log Message: Determinants Index: Matrix4f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix4f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix4f.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Matrix4f.java 24 Aug 2002 21:26:47 -0000 1.4 +++ Matrix4f.java 24 Aug 2002 21:35:20 -0000 1.5 @@ -395,8 +395,36 @@ m33 = dest.m33; } else transpose(); - + return dest; + } + + /** + * @return the determinant of the matrix + */ + public float determinant() { + float f = + m00 + * ((m11 * m22 * m33 + m12 * m23 * m31 + m13 * m21 * m32) + - m13 * m22 * m31 + - m11 * m23 * m32 + - m12 * m21 * m33); + f -= m01 + * ((m10 * m22 * m33 + m12 * m23 * m30 + m13 * m20 * m32) + - m13 * m22 * m30 + - m10 * m23 * m32 + - m12 * m20 * m33); + f += m02 + * ((m10 * m21 * m33 + m11 * m23 * m30 + m13 * m20 * m31) + - m13 * m21 * m30 + - m10 * m23 * m31 + - m11 * m20 * m33); + f -= m03 + * ((m10 * m21 * m32 + m11 * m22 * m30 + m12 * m20 * m31) + - m12 * m21 * m30 + - m10 * m22 * m31 + - m11 * m20 * m32); + return f; } Index: Matrix3f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix3f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix3f.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Matrix3f.java 24 Aug 2002 21:26:47 -0000 1.4 +++ Matrix3f.java 24 Aug 2002 21:35:20 -0000 1.5 @@ -288,10 +288,10 @@ * @return the transposed matrix */ public Matrix3f transpose(Matrix3f dest) { - + if (dest == null) dest = new Matrix3f(); - + if (this != dest) { m00 = dest.m00; m01 = dest.m10; @@ -304,9 +304,20 @@ m22 = dest.m22; } else transpose(); - + return this; - + + } + + /** + * @return the determinant of the matrix + */ + public float determinant() { + float f = + m00 * (m11 * m22 - m12 * m21) + + m01 * (m12 * m20 - m10 * m22) + + m02 * (m10 * m21 - m11 * m20); + return f; } /** |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 21:26:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector In directory usw-pr-cvs1:/tmp/cvs-serv12723/src/java/org/lwjgl/vector Modified Files: Matrix2f.java Matrix4f.java Matrix3f.java Log Message: Load & store into FloatBuffers Index: Matrix2f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix2f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix2f.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Matrix2f.java 24 Aug 2002 21:12:31 -0000 1.3 +++ Matrix2f.java 24 Aug 2002 21:26:47 -0000 1.4 @@ -75,6 +75,37 @@ } /** + * Load from a float buffer. The buffer stores the matrix in column major + * (OpenGL) order. + * + * @param buf A float buffer to read from + * @return this + */ + public Matrix2f load(FloatBuffer buf) { + + m00 = buf.get(); + m10 = buf.get(); + m01 = buf.get(); + m11 = buf.get(); + + return this; + } + + /** + * Store this matrix in a float buffer. The matrix is stored in column + * major (openGL) order. + * @param buf The buffer to store this matrix in + */ + public void store(FloatBuffer buf) { + buf.put(m00); + buf.put(m10); + buf.put(m01); + buf.put(m11); + } + + + + /** * Add two matrices together and place the result in a third matrix. * @param left The left source matrix * @param right The right source matrix @@ -165,14 +196,14 @@ } /** - * Multiply a Vector by a matrix and return the result in a destination + * Transform a Vector by a matrix and return the result in a destination * vector. * @param left The left matrix * @param right The right vector * @param dest The destination vector, or null if a new one is to be created * @return the destination vector */ - public static Vector2f mul(Matrix2f left, Vector2f right, Vector2f dest) { + public static Vector2f transform(Matrix2f left, Vector2f right, Vector2f dest) { Vector2f temp = null; Index: Matrix4f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix4f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix4f.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Matrix4f.java 24 Aug 2002 21:12:31 -0000 1.3 +++ Matrix4f.java 24 Aug 2002 21:26:47 -0000 1.4 @@ -31,6 +31,8 @@ */ package org.lwjgl.vector; +import java.nio.FloatBuffer; + /** * Holds a 4x4 float matrix. * @@ -124,6 +126,61 @@ return this; } + + /** + * Load from a float buffer. The buffer stores the matrix in column major + * (OpenGL) order. + * + * @param buf A float buffer to read from + * @return this + */ + public Matrix4f load(FloatBuffer buf) { + + m00 = buf.get(); + m10 = buf.get(); + m20 = buf.get(); + m30 = buf.get(); + m01 = buf.get(); + m11 = buf.get(); + m21 = buf.get(); + m31 = buf.get(); + m02 = buf.get(); + m12 = buf.get(); + m22 = buf.get(); + m32 = buf.get(); + m03 = buf.get(); + m13 = buf.get(); + m23 = buf.get(); + m33 = buf.get(); + + return this; + } + + /** + * Store this matrix in a float buffer. The matrix is stored in column + * major (openGL) order. + * @param buf The buffer to store this matrix in + */ + public void store(FloatBuffer buf) { + buf.put(m00); + buf.put(m10); + buf.put(m20); + buf.put(m30); + buf.put(m01); + buf.put(m11); + buf.put(m21); + buf.put(m31); + buf.put(m02); + buf.put(m12); + buf.put(m22); + buf.put(m32); + buf.put(m03); + buf.put(m13); + buf.put(m23); + buf.put(m33); + } + + /** * Add two matrices together and place the result in a third matrix. * @param left The left source matrix @@ -253,14 +310,14 @@ } /** - * Multiply a Vector by a matrix and return the result in a destination + * Transform a Vector by a matrix and return the result in a destination * vector. * @param left The left matrix * @param right The right vector * @param dest The destination vector, or null if a new one is to be created * @return the destination vector */ - public static Vector4f mul(Matrix4f left, Vector4f right, Vector4f dest) { + public static Vector4f transform(Matrix4f left, Vector4f right, Vector4f dest) { Vector4f temp = null; Index: Matrix3f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix3f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix3f.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Matrix3f.java 24 Aug 2002 21:12:31 -0000 1.3 +++ Matrix3f.java 24 Aug 2002 21:26:47 -0000 1.4 @@ -31,6 +31,8 @@ */ package org.lwjgl.vector; +import java.nio.FloatBuffer; + /** * $Id$ * @@ -77,6 +79,47 @@ return this; } + + /** + * Load from a float buffer. The buffer stores the matrix in column major + * (OpenGL) order. + * + * @param buf A float buffer to read from + * @return this + */ + public Matrix3f load(FloatBuffer buf) { + + m00 = buf.get(); + m10 = buf.get(); + m20 = buf.get(); + m01 = buf.get(); + m11 = buf.get(); + m21 = buf.get(); + m02 = buf.get(); + m12 = buf.get(); + m22 = buf.get(); + + return this; + } + + /** + * Store this matrix in a float buffer. The matrix is stored in column + * major (openGL) order. + * @param buf The buffer to store this matrix in + */ + public void store(FloatBuffer buf) { + buf.put(m00); + buf.put(m10); + buf.put(m20); + buf.put(m01); + buf.put(m11); + buf.put(m21); + buf.put(m02); + buf.put(m12); + buf.put(m22); + } + + /** * Add two matrices together and place the result in a third matrix. @@ -193,14 +236,14 @@ } /** - * Multiply a Vector by a matrix and return the result in a destination + * Transform a Vector by a matrix and return the result in a destination * vector. * @param left The left matrix * @param right The right vector * @param dest The destination vector, or null if a new one is to be created * @return the destination vector */ - public static Vector3f mul(Matrix3f left, Vector3f right, Vector3f dest) { + public static Vector3f transform(Matrix3f left, Vector3f right, Vector3f dest) { Vector3f temp = null; |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 21:19:08
|
Update of /cvsroot/java-game-lib/LWJGL In directory usw-pr-cvs1:/tmp/cvs-serv10872 Added Files: .cvsignore Log Message: Checkpoint --- NEW FILE: .cvsignore --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/.cvsignore .classpath |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 21:18:46
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory usw-pr-cvs1:/tmp/cvs-serv10752/src/native/win32 Added Files: .cvsignore Log Message: Checkpoint --- NEW FILE: .cvsignore --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/.cvsignore Debug |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 21:17:39
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory usw-pr-cvs1:/tmp/cvs-serv10405/src/native/common Modified Files: org_lwjgl_input_Mouse.h .cvsignore Added Files: org_lwjgl_input_Joystick.h org_lwjgl_input_GamePad.h Log Message: Checkpoint --- NEW FILE: org_lwjgl_input_Joystick.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_input_Joystick.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_input_Joystick */ #ifndef _Included_org_lwjgl_input_Joystick #define _Included_org_lwjgl_input_Joystick #ifdef __cplusplus extern "C" { #endif /* Inaccessible static: _00024assertionsDisabled */ /* Inaccessible static: created */ /* Inaccessible static: button */ /* Inaccessible static: x */ /* Inaccessible static: y */ /* Inaccessible static: z */ /* Inaccessible static: readBuffer */ /* Inaccessible static: readBufferAddress */ #undef org_lwjgl_input_Joystick_JOYSTICK_EVENT_SIZE #define org_lwjgl_input_Joystick_JOYSTICK_EVENT_SIZE 20L #undef org_lwjgl_input_Joystick_JOYSTICK_EVENT_STRIDE #define org_lwjgl_input_Joystick_JOYSTICK_EVENT_STRIDE 32L /* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_input_Joystick * Method: initIDs * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_input_Joystick_initIDs (JNIEnv *, jclass); /* * Class: org_lwjgl_input_Joystick * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_Joystick_nCreate (JNIEnv *, jclass); /* * Class: org_lwjgl_input_Joystick * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_input_Joystick_nDestroy (JNIEnv *, jclass); /* * Class: org_lwjgl_input_Joystick * Method: nPoll * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_input_Joystick_nPoll (JNIEnv *, jclass); /* * Class: org_lwjgl_input_Joystick * Method: nGetNumButtons * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_lwjgl_input_Joystick_nGetNumButtons (JNIEnv *, jclass); /* * Class: org_lwjgl_input_Joystick * Method: nHasZValue * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_Joystick_nHasZValue (JNIEnv *, jclass); /* * Class: org_lwjgl_input_Joystick * Method: nRead * Signature: (I)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_input_Joystick_nRead (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_input_Joystick * Method: nEnableBuffer * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_lwjgl_input_Joystick_nEnableBuffer (JNIEnv *, jclass); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_input_GamePad.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_input_GamePad.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_input_GamePad */ #ifndef _Included_org_lwjgl_input_GamePad #define _Included_org_lwjgl_input_GamePad #ifdef __cplusplus extern "C" { #endif /* Inaccessible static: _00024assertionsDisabled */ /* Inaccessible static: PAD_UP */ /* Inaccessible static: PAD_DOWN */ /* Inaccessible static: PAD_LEFT */ /* Inaccessible static: PAD_RIGHT */ /* Inaccessible static: PAD_BUTTON0 */ /* Inaccessible static: PAD_BUTTON1 */ /* Inaccessible static: PAD_BUTTON2 */ /* Inaccessible static: PAD_BUTTON3 */ /* Inaccessible static: PAD_BUTTON4 */ /* Inaccessible static: PAD_BUTTON5 */ /* Inaccessible static: PAD_BUTTON6 */ /* Inaccessible static: PAD_BUTTON7 */ /* Inaccessible static: PAD_BUTTON8 */ /* Inaccessible static: created */ /* Inaccessible static: buttonDownBuffer */ /* Inaccessible static: buttonDownAddress */ /* Inaccessible static: readBuffer */ /* Inaccessible static: readBufferAddress */ /* Inaccessible static: button */ /* Inaccessible static: state */ /* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_input_GamePad * Method: initIDs * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_input_GamePad_initIDs (JNIEnv *, jclass); /* * Class: org_lwjgl_input_GamePad * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_GamePad_nCreate (JNIEnv *, jclass); /* * Class: org_lwjgl_input_GamePad * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_input_GamePad_nDestroy (JNIEnv *, jclass); /* * Class: org_lwjgl_input_GamePad * Method: nPoll * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_input_GamePad_nPoll (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_input_GamePad * Method: nRead * Signature: (I)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_input_GamePad_nRead (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_input_GamePad * Method: nEnableBuffer * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_lwjgl_input_GamePad_nEnableBuffer (JNIEnv *, jclass); /* * Class: org_lwjgl_input_GamePad * Method: nGetNumButtons * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_lwjgl_input_GamePad_nGetNumButtons (JNIEnv *, jclass); #ifdef __cplusplus } #endif #endif Index: org_lwjgl_input_Mouse.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_input_Mouse.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_input_Mouse.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- org_lwjgl_input_Mouse.h 11 Aug 2002 11:49:34 -0000 1.1.1.1 +++ org_lwjgl_input_Mouse.h 24 Aug 2002 21:17:37 -0000 1.2 @@ -13,6 +13,12 @@ /* Inaccessible static: dx */ /* Inaccessible static: dy */ /* Inaccessible static: dz */ +/* Inaccessible static: readBuffer */ +/* Inaccessible static: readBufferAddress */ +#undef org_lwjgl_input_Mouse_MOUSE_EVENT_SIZE +#define org_lwjgl_input_Mouse_MOUSE_EVENT_SIZE 20L +#undef org_lwjgl_input_Mouse_MOUSE_EVENT_STRIDE +#define org_lwjgl_input_Mouse_MOUSE_EVENT_STRIDE 32L /* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_input_Mouse @@ -45,6 +51,38 @@ */ JNIEXPORT void JNICALL Java_org_lwjgl_input_Mouse_nPoll (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Mouse + * Method: nGetNumButtons + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_Mouse_nGetNumButtons + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Mouse + * Method: nHasZValue + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_Mouse_nHasZValue + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Mouse + * Method: nEnableBuffer + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_Mouse_nEnableBuffer + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_input_Mouse + * Method: nRead + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_input_Mouse_nRead + (JNIEnv *, jclass, jint); #ifdef __cplusplus } Index: .cvsignore CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/.cvsignore =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 24 Aug 2002 09:32:01 -0000 1.1 +++ .cvsignore 24 Aug 2002 21:17:37 -0000 1.2 @@ -1 +1,2 @@ Debug +Release |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 21:17:26
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/msvc In directory usw-pr-cvs1:/tmp/cvs-serv10358/src/native/msvc Modified Files: Native.dsp Log Message: Checkpoint Index: Native.dsp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/msvc/Native.dsp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/msvc/Native.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Native.dsp 17 Aug 2002 14:13:12 -0000 1.4 +++ Native.dsp 24 Aug 2002 21:17:24 -0000 1.5 @@ -43,7 +43,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NATIVE_EXPORTS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "%JDK_HOME%\include" /I "..\common" /I "c:\j2sdk1.4.0\include" /I "c:\j2sdk1.4.0\include\win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NATIVE_EXPORTS" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "%JDK_HOME%\include" /I "..\common" /I "c:\j2sdk1.4.0\include" /I "c:\j2sdk1.4.0\include\win32" /I "C:\Program Files\Creative Labs\OpenAL 1.0 SDK\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NATIVE_EXPORTS" /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -54,7 +54,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dxguid.lib dinput.lib opengl32.lib glu32.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\lwjgl.dll" /libpath:"c:\j2sdk1.4.0\lib" +# ADD LINK32 opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dxguid.lib dinput.lib glu32.lib openal32.lib alut.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\lwjgl.dll" /libpath:"c:\j2sdk1.4.0\lib" /libpath:"C:\Program Files\Creative Labs\OpenAL 1.0 SDK\Libs" !ELSEIF "$(CFG)" == "Native - Win32 Debug" @@ -70,7 +70,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NATIVE_EXPORTS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\common" /I "c:\j2sdk1.4.0\include" /I "c:\j2sdk1.4.0\include\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NATIVE_EXPORTS" /FR /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\common" /I "c:\j2sdk1.4.0\include" /I "c:\j2sdk1.4.0\include\win32" /I "C:\Program Files\Creative Labs\OpenAL 1.0 SDK\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NATIVE_EXPORTS" /FR /FD /GZ /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 @@ -81,7 +81,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 jvm.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dxguid.lib dinput.lib glu32.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\bin\lwjgl_d.dll" /pdbtype:sept /libpath:"c:\j2sdk1.4.0\lib" +# ADD LINK32 jvm.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dxguid.lib dinput.lib glu32.lib openal32.lib alut.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\bin\lwjgl_d.dll" /pdbtype:sept /libpath:"c:\j2sdk1.4.0\lib" /libpath:"C:\Program Files\Creative Labs\OpenAL 1.0 SDK\Libs" !ENDIF @@ -114,7 +114,71 @@ # End Source File # Begin Source File -SOURCE=..\win32\org_lwjgl_Math.cpp +SOURCE=..\win32\org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_openal_ALC.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_openal_ALUT.cpp +# End Source File +# Begin Source File + +SOURCE=..\win32\org_lwjgl_openal_CoreAL.cpp # End Source File # Begin Source File @@ -154,6 +218,14 @@ # End Source File # Begin Source File +SOURCE=..\common\org_lwjgl_input_GamePad.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_input_Joystick.h +# End Source File +# Begin Source File + SOURCE=..\common\org_lwjgl_input_Keyboard.h # End Source File # Begin Source File @@ -162,7 +234,99 @@ # End Source File # Begin Source File -SOURCE=..\common\org_lwjgl_Math.h +SOURCE=..\common\org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpAdd_MatrixOpOffset.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpCopy_MatrixOpOffset.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpInvert_MatrixOpOffset.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpMultiply_MatrixOpOffset.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpNegate_MatrixOpOffset.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpNormalise_MatrixOpOffset.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpSubtract_MatrixOpOffset.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_openal_ALC.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_openal_ALUT.h +# End Source File +# Begin Source File + +SOURCE=..\common\org_lwjgl_openal_CoreAL.h # End Source File # Begin Source File |
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory usw-pr-cvs1:/tmp/cvs-serv10185/src/native/win32 Modified Files: LWJGL.cpp org_lwjgl_Display.cpp org_lwjgl_Math.cpp Added Files: org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.cpp org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.cpp org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.cpp org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.cpp org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp Log Message: Checkpoint --- NEW FILE: org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.h" /* * Class: org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpSubtract_00024MatrixOpSafe_execute ( JNIEnv * env, jobject obj, jint leftSourceAddress, jint leftSourceStride, jint leftElements, jint leftSourceWidth, jint leftSourceHeight, jboolean transposeLeftSource, jint rightSourceAddress, jint rightSourceStride, jint rightElements, jint rightSourceWidth, jint rightSourceHeight, jboolean transposeRightSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * leftSource = (float *) leftSourceAddress; float * rightSource = (float *) rightSourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.h" /* * Class: org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNegate_00024MatrixOpDirect_execute ( JNIEnv * env, jobject obj, jint sourceAddress, jint sourceStride, jint numElements, jint sourceWidth, jint sourceHeight, jboolean transposeSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * source = (float *) sourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.h" /* * Class: org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpCopy_00024MatrixOpSafe_execute ( JNIEnv * env, jobject obj, jint sourceAddress, jint sourceStride, jint numElements, jint sourceWidth, jint sourceHeight, jboolean transposeSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * source = (float *) sourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.h" /* * Class: org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNormalise_00024MatrixOpDirect_execute ( JNIEnv * env, jobject obj, jint sourceAddress, jint sourceStride, jint numElements, jint sourceWidth, jint sourceHeight, jboolean transposeSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * source = (float *) sourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.h" /* * Class: org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpAdd_00024MatrixOpDirect_execute ( JNIEnv * env, jobject obj, jint leftSourceAddress, jint leftSourceStride, jint leftElements, jint leftSourceWidth, jint leftSourceHeight, jboolean transposeLeftSource, jint rightSourceAddress, jint rightSourceStride, jint rightElements, jint rightSourceWidth, jint rightSourceHeight, jboolean transposeRightSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * leftSource = (float *) leftSourceAddress; float * rightSource = (float *) rightSourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.h" /* * Class: org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpMultiply_00024MatrixOpSafe_execute ( JNIEnv * env, jobject obj, jint leftSourceAddress, jint leftSourceStride, jint leftElements, jint leftSourceWidth, jint leftSourceHeight, jboolean transposeLeftSource, jint rightSourceAddress, jint rightSourceStride, jint rightElements, jint rightSourceWidth, jint rightSourceHeight, jboolean transposeRightSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * leftSource = (float *) leftSourceAddress; float * rightSource = (float *) rightSourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.h" /* * Class: org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNormalise_00024MatrixOpSafe_execute ( JNIEnv * env, jobject obj, jint sourceAddress, jint sourceStride, jint numElements, jint sourceWidth, jint sourceHeight, jboolean transposeSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * source = (float *) sourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.h" /* * Class: org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpSafe_execute ( JNIEnv * env, jobject obj, jint sourceAddress, jint sourceStride, jint numElements, jint sourceWidth, jint sourceHeight, jboolean transposeSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * source = (float *) sourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.h" /* * Class: org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpMultiply_00024MatrixOpDirect_execute ( JNIEnv * env, jobject obj, jint leftSourceAddress, jint leftSourceStride, jint leftElements, jint leftSourceWidth, jint leftSourceHeight, jboolean transposeLeftSource, jint rightSourceAddress, jint rightSourceStride, jint rightElements, jint rightSourceWidth, jint rightSourceHeight, jboolean transposeRightSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * leftSource = (float *) leftSourceAddress; float * rightSource = (float *) rightSourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.h" /* * Class: org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpSubtract_00024MatrixOpDirect_execute ( JNIEnv * env, jobject obj, jint leftSourceAddress, jint leftSourceStride, jint leftElements, jint leftSourceWidth, jint leftSourceHeight, jboolean transposeLeftSource, jint rightSourceAddress, jint rightSourceStride, jint rightElements, jint rightSourceWidth, jint rightSourceHeight, jboolean transposeRightSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * leftSource = (float *) leftSourceAddress; float * rightSource = (float *) rightSourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.h" /* * Class: org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpDirect_execute ( JNIEnv * env, jobject obj, jint sourceAddress, jint sourceStride, jint numElements, jint sourceWidth, jint sourceHeight, jboolean transposeSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * source = (float *) sourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.h" /* * Class: org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpCopy_00024MatrixOpDirect_execute ( JNIEnv * env, jobject obj, jint sourceAddress, jint sourceStride, jint numElements, jint sourceWidth, jint sourceHeight, jboolean transposeSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * source = (float *) sourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.h" /* * Class: org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNegate_00024MatrixOpSafe_execute ( JNIEnv * env, jobject obj, jint sourceAddress, jint sourceStride, jint numElements, jint sourceWidth, jint sourceHeight, jboolean transposeSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * source = (float *) sourceAddress; float * dest = (float *) destAddress; } --- NEW FILE: org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id$ * * Win32 math library. * * @author cix_foo <ci...@us...> * @version $Revision$ */ #include <windows.h> #include "org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.h" /* * Class: org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpAdd_00024MatrixOpSafe_execute ( JNIEnv * env, jobject obj, jint leftSourceAddress, jint leftSourceStride, jint leftElements, jint leftSourceWidth, jint leftSourceHeight, jboolean transposeLeftSource, jint rightSourceAddress, jint rightSourceStride, jint rightElements, jint rightSourceWidth, jint rightSourceHeight, jboolean transposeRightSource, jint destAddress, jint destStride, jboolean transposeDest ) { float * leftSource = (float *) leftSourceAddress; float * rightSource = (float *) rightSourceAddress; float * dest = (float *) destAddress; } Index: LWJGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/LWJGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/LWJGL.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- LWJGL.cpp 17 Aug 2002 14:13:11 -0000 1.3 +++ LWJGL.cpp 24 Aug 2002 21:16:53 -0000 1.4 @@ -42,7 +42,6 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdio.h> -#include "LWJGL.h" /* * DLL entry point for Windows. Called when Java loads the .dll Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_Display.cpp 17 Aug 2002 14:13:12 -0000 1.4 +++ org_lwjgl_Display.cpp 24 Aug 2002 21:16:53 -0000 1.5 @@ -129,7 +129,39 @@ JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_Display_getAvailableDisplayModes (JNIEnv * env, jclass clazz) { - return NULL; + + DEVMODE mode; + + // First count the number of display modes. + int i = 0, n = 0; + while (EnumDisplaySettings(NULL, i ++, &mode) != 0) { + // Filter out indexed modes + if (mode.dmBitsPerPel < 16) { + continue; + } else + n ++; + } + ; // Do nothing + + // Allocate an array of DisplayModes big enough + jclass displayModeClass = env->FindClass("org/lwjgl/DisplayMode"); + jobjectArray ret = env->NewObjectArray(n, displayModeClass, NULL); + jmethodID displayModeConstructor = env->GetMethodID(displayModeClass, "<init>", "(IIII)V"); + + i = n = 0; + while (EnumDisplaySettings(NULL, i ++, &mode) != 0) { + // Filter out indexed modes + if (mode.dmBitsPerPel < 16) { + continue; + } else { + jobject displayMode = env->NewObject(displayModeClass, displayModeConstructor, mode.dmPelsWidth, mode.dmPelsHeight, + mode.dmBitsPerPel, mode.dmDisplayFrequency); + + env->SetObjectArrayElement(ret, n ++, displayMode); + } + } + + return ret; } /* @@ -138,13 +170,13 @@ * Signature: (IIIIZ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate - (JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jboolean debug) + (JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jboolean fullscreen) { #ifdef _DEBUG printf("Creating display: size %dx%d %dhz %dbpp...\n", width, height, freq, bpp); #endif - if (!debug && SetDisplayMode(width, height, bpp, freq) != 1) + if (fullscreen && SetDisplayMode(width, height, bpp, freq) != 1) return JNI_FALSE; /* Index: org_lwjgl_Math.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Math.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_Math.cpp 15 Aug 2002 15:43:02 -0000 1.2 +++ org_lwjgl_Math.cpp 24 Aug 2002 21:16:53 -0000 1.3 @@ -43,111 +43,3 @@ #include "org_lwjgl_Math.h" #include "math.h" -/* - * Class: org_lwjgl_Math - * Method: random - * Signature: ()F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_random - (JNIEnv * env, jclass clazz) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: sin - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_sin - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: cos - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_cos - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: tan - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_tan - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: asin - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_asin - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: acos - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_acos - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: atan - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_atan - (JNIEnv * env, jclass clazz, jfloat theta) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: sqrt - * Signature: (F)F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_Math_sqrt - (JNIEnv * env, jclass clazz, jfloat value) -{ - return 0.0f; -} - -/* - * Class: org_lwjgl_Math - * Method: matrixOp - * Signature: (IIIIIIZIIZ)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Math_matrixOp__IIIIIIZIIZ - (JNIEnv * env, jclass clazz, jint, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean) -{ -} - -/* - * Class: org_lwjgl_Math - * Method: matrixOp - * Signature: (IIIIIZIIIIZIIZ)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Math_matrixOp__IIIIIZIIIIZIIZ - (JNIEnv * env, jclass clazz, jint, jint, jint, jint, jint, jboolean, jint, jint, jint, jint, jboolean, jint, jint, jboolean) -{ -} - |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 21:15:05
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory usw-pr-cvs1:/tmp/cvs-serv9752/src/java/org/lwjgl/opengl Modified Files: GL.java Log Message: Checkpoint Index: GL.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- GL.java 19 Aug 2002 14:01:03 -0000 1.6 +++ GL.java 24 Aug 2002 21:15:03 -0000 1.7 @@ -1520,6 +1520,10 @@ public boolean SGIS_generate_mipmap; public boolean SGIX_shadow; public boolean SGIX_depth_texture; + public boolean OpenGL11; + public boolean OpenGL12; + public boolean OpenGL13; + public boolean OpenGL14; /** * Constructor for GL. @@ -1559,6 +1563,22 @@ } + // Let's see what openGL version we are too: + String version = getString(VERSION); + int i = version.indexOf("1."); + if (i > -1) { + char c = version.charAt(i + 2); + if (c == '2') { + OpenGL12 = true; + } else if (c == '3') { + OpenGL12 = true; + OpenGL13 = true; + } else if (c == '4') { + OpenGL12 = true; + OpenGL13 = true; + OpenGL14 = true; + } + } } /* @@ -1570,6 +1590,7 @@ public static boolean WGL_ARB_pixel_format; public static boolean WGL_ARB_render_texture; public static boolean WGL_EXT_extensions_string; + public static boolean WGL_EXT_swap_control; /** * Checks and sets WGL_EXT_extensions_string and WGL_ARB_extensions_string @@ -1601,10 +1622,13 @@ exts = wglGetExtensionsStringARB(Display.getHandle()); // Remember - this is an HWND not an HDC, which is what's required else exts = wglGetExtensionsStringEXT(); - + + System.out.println("Available WGL extensions:"); StringTokenizer st = new StringTokenizer(exts); while (st.hasMoreTokens()) { String ext = st.nextToken(); + + System.out.println(ext); Field f = (Field) map.get(ext); if (f != null) { |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 21:14:42
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory usw-pr-cvs1:/tmp/cvs-serv9668/src/java/org/lwjgl/input Modified Files: GamePad.java Joystick.java Mouse.java Log Message: Buffering added Index: GamePad.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/input/GamePad.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/GamePad.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- GamePad.java 20 Aug 2002 14:55:29 -0000 1.4 +++ GamePad.java 24 Aug 2002 21:14:40 -0000 1.5 @@ -167,7 +167,8 @@ private static native void nPoll(int keyDownBufferAddress); /** - * Reads the gamepad buffer. + * Reads the gamepad buffer. Call next() to read the events one by one. + * @see #next() */ public static void read() { assert created : "The gamepad has not been created."; Index: Joystick.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/input/Joystick.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Joystick.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Joystick.java 20 Aug 2002 14:55:29 -0000 1.4 +++ Joystick.java 24 Aug 2002 21:14:40 -0000 1.5 @@ -32,6 +32,8 @@ package org.lwjgl.input; +import java.nio.ByteBuffer; + import org.lwjgl.Display; import org.lwjgl.Sys; @@ -72,6 +74,20 @@ public static float z; /** + * The joystick events from the last read: a sequence of Events + */ + private static ByteBuffer readBuffer; + + /** Address of the read buffer */ + private static int readBufferAddress; + + /** The size in bytes of a single joystick event */ + private static final int JOYSTICK_EVENT_SIZE = 20; + + /** The stride in bytes of a single joystick event */ + private static final int JOYSTICK_EVENT_STRIDE = 32; + + /** * Joystick cannot be constructed. */ private Joystick() { @@ -166,4 +182,66 @@ * Native implementation of hasZValue() */ private static native boolean nHasZValue(); + + /** + * Enable joystick buffering. Must be called after the joystick is created. + * @return the size of the joystick buffer in events, or 0 if no buffering + * can be enabled for any reason + */ + public static int enableBuffer() { + assert created : "The joystick has not been created."; + return nEnableBuffer(); + } + + /** + * Native method to read the joystick buffer + * + * @param readBufferAddress the address of the joystick buffer + * @return the number of joystick events read + */ + private static native int nRead(int readBufferAddress); + + /** + * Reads the joystick buffer. + */ + public static void read() { + assert created : "The joystick has not been created."; + assert readBuffer != null : "Joystick buffering has not been enabled."; + readBuffer.clear(); + readBuffer.limit(nRead(readBufferAddress) << 1); + } + + /** + * Native method to enable the buffer + * @return the size of the buffer allocated, in events (1 event is 2 bytes), + * or 0 if no buffer can be allocated + */ + private static native int nEnableBuffer(); + + /** + * Gets the next joystick event. This returns its results as if a poll() had + * been called. + * + * @return true if a joystick event was read, false otherwise + */ + public static boolean next() { + assert created : "The joystick has not been created."; + assert readBuffer != null : "Joystick buffering has not been enabled."; + + if (readBuffer.hasRemaining()) { + x = readBuffer.getFloat(); + y = readBuffer.getFloat(); + z = readBuffer.getFloat(); + for (int i = 0; i < button.length; i ++) + button[i] = readBuffer.get() != (byte)0; + readBuffer.position(readBuffer.position() + (JOYSTICK_EVENT_STRIDE - JOYSTICK_EVENT_SIZE)); + return true; + } else + return false; + + } + + + + } Index: Mouse.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Mouse.java 20 Aug 2002 14:55:29 -0000 1.6 +++ Mouse.java 24 Aug 2002 21:14:40 -0000 1.7 @@ -32,6 +32,8 @@ package org.lwjgl.input; +import java.nio.ByteBuffer; + import org.lwjgl.Display; import org.lwjgl.Sys; @@ -40,7 +42,6 @@ * * A raw Mouse interface. This can be used to poll the current state of the * mouse buttons, and determine the mouse movement delta since the last poll. - * No buffering is available. * * Up to 8 buttons are available. A scrolly wheel, if present, is the z * value. This will be in the range of -10000 to +10000. @@ -70,6 +71,21 @@ public static int dz; /** + * The mouse events from the last read: a sequence of Events + */ + private static ByteBuffer readBuffer; + + /** Address of the read buffer */ + private static int readBufferAddress; + + /** The size in bytes of a single mouse event */ + private static final int MOUSE_EVENT_SIZE = 20; + + /** The stride in bytes of a single mouse event */ + private static final int MOUSE_EVENT_STRIDE = 32; + + + /** * Mouse cannot be constructed. */ private Mouse() { @@ -164,4 +180,69 @@ * Native implementation of hasZValue() */ private static native boolean nHasZValue(); + + /** + * Enable mouse buffering. Must be called after the mouse is created. + * @return the size of the mouse buffer in events, or 0 if no buffering + * can be enabled for any reason + */ + public static int enableBuffer() { + assert created : "The mouse has not been created."; + return nEnableBuffer(); + } + + + /** + * Native method to enable the buffer + * @return the size of the buffer allocated, in events (1 event is 2 bytes), + * or 0 if no buffer can be allocated + */ + private static native int nEnableBuffer(); + + + /** + * Gets the next mouse event. This returns its results as if a poll() had + * been called. + * + * @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 (readBuffer.hasRemaining()) { + dx = readBuffer.getInt(); + dy = readBuffer.getInt(); + dz = readBuffer.getInt(); + for (int i = 0; i < button.length; i ++) + button[i] = readBuffer.get() != (byte)0; + readBuffer.position(readBuffer.position() + (MOUSE_EVENT_STRIDE - MOUSE_EVENT_SIZE)); + return true; + } else + return false; + + } + + + /** + * Native method to read the gamepad buffer + * + * @param readBufferAddress the address of the mouse buffer + * @return the number of mouse events read + */ + private static native int nRead(int readBufferAddress); + + + /** + * Reads the mouse buffer. + */ + public static void read() { + assert created : "The mouse has not been created."; + assert readBuffer != null : "Mouse buffering has not been enabled."; + readBuffer.clear(); + readBuffer.limit(nRead(readBufferAddress) * MOUSE_EVENT_SIZE); + } + + + } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 21:12:35
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector In directory usw-pr-cvs1:/tmp/cvs-serv9050/src/java/org/lwjgl/vector Modified Files: Matrix2f.java Vector3f.java Matrix4f.java Vector2f.java Vector4f.java Matrix3f.java Log Message: Bunch of matrix and vector code added Index: Matrix2f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix2f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix2f.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Matrix2f.java 16 Aug 2002 21:52:25 -0000 1.2 +++ Matrix2f.java 24 Aug 2002 21:12:31 -0000 1.3 @@ -36,20 +36,258 @@ /** * $Id$ * - * Holds a 2x2 matrix. - * + * Holds a 2x2 matrix + * * @author cix_foo <ci...@us...> * @version $Revision$ */ public class Matrix2f { - public float m00, m01, m10, m11; + public float m00 = 1.0f, m01, m10, m11 = 1.0f; /** * Constructor for Matrix2f. */ public Matrix2f() { } + + /** + * Constructor + */ + public Matrix2f(Matrix2f src) { + load(src); + } + + /** + * Load from another matrix2f + * @param src The source matrix + * @return this + */ + public Matrix2f load(Matrix2f src) { + + m00 = src.m00; + m01 = src.m01; + m10 = src.m10; + m11 = src.m11; + + return this; + } + + /** + * Add two matrices together and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix2f add(Matrix2f left, Matrix2f right, Matrix2f dest) { + + Matrix2f temp = null; + + if (dest == null) + dest = new Matrix2f(); + else if (dest == left || dest == right) { + temp = dest; + dest = new Matrix2f(); + } + + dest.m00 = left.m00 + right.m00; + dest.m01 = left.m01 + right.m01; + dest.m10 = left.m10 + right.m10; + dest.m11 = left.m11 + right.m11; + + if (temp != null) { + temp.load(dest); + return temp; + } else + return dest; + } + + /** + * Subtract the right matrix from the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix2f sub(Matrix2f left, Matrix2f right, Matrix2f dest) { + + Matrix2f temp = null; + + if (dest == null) + dest = new Matrix2f(); + else if (dest == left || dest == right) { + temp = dest; + dest = new Matrix2f(); + } + + dest.m00 = left.m00 - right.m00; + dest.m01 = left.m01 - right.m01; + dest.m10 = left.m10 - right.m10; + dest.m11 = left.m11 - right.m11; + + if (temp != null) { + temp.load(dest); + return temp; + } else + return dest; + } + + /** + * Multiply the right matrix by the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix2f mul(Matrix2f left, Matrix2f right, Matrix2f dest) { + + Matrix2f temp = null; + + if (dest == null) + dest = new Matrix2f(); + else if (dest == left || dest == right) { + temp = dest; + dest = new Matrix2f(); + } + + dest.m00 = left.m00 * right.m00 + left.m10 * right.m01; + dest.m01 = left.m01 * right.m00 + left.m11 * right.m01; + dest.m10 = left.m00 * right.m10 + left.m10 * right.m11; + dest.m11 = left.m01 * right.m10 + left.m11 * right.m11; + + if (temp != null) { + temp.load(dest); + return temp; + } else + return dest; + } + + /** + * Multiply a Vector by a matrix and return the result in a destination + * vector. + * @param left The left matrix + * @param right The right vector + * @param dest The destination vector, or null if a new one is to be created + * @return the destination vector + */ + public static Vector2f mul(Matrix2f left, Vector2f right, Vector2f dest) { + + Vector2f temp = null; + + if (dest == null) + dest = new Vector2f(); + else if (dest == right) { + temp = dest; + dest = new Vector2f(); + } + + dest.x = left.m00 * right.x + left.m10 * right.y; + dest.y = left.m01 * right.x + left.m11 * right.y; + + if (temp != null) { + temp.set(dest); + return temp; + } else + return dest; + } + + /** + * Transpose this matrix + * @return this + */ + public Matrix2f transpose() { + float temp; + + temp = m01; + m01 = m10; + m10 = temp; + return this; + } + + /** + * Transpose this matrix and place the result in another matrix. + * @param dest The destination matrix or null if a new matrix is to be created + * @return the transposed matrix + */ + public Matrix2f transpose(Matrix2f dest) { + + if (dest == null) + dest = new Matrix2f(); + + if (dest == this) + transpose(); + else { + dest.m01 = m10; + dest.m10 = m01; + } + + return dest; + } + /** + * Invert this matrix + * @return this + */ + public Matrix2f invert() { + return this; + } + + /** + * Negate this matrix + * @return this + */ + public Matrix2f negate() { + + m00 = -m00; + m01 = -m01; + m10 = -m10; + m11 = -m11; + + return this; + } + + /** + * Negate this matrix and stash the result in another matrix. + * @param dest The destination matrix, or null if a new matrix is to be created + * @return the negated matrix + */ + public Matrix2f negate(Matrix2f dest) { + + if (dest == null) + dest = new Matrix2f(); + + dest.m00 = -m00; + dest.m01 = -m01; + dest.m10 = -m10; + dest.m11 = -m11; + + return dest; + } + + /** + * Set this matrix to be the identity matrix. + * @return this + */ + public Matrix2f identity() { + m00 = 1.0f; + m01 = 0.0f; + m10 = 0.0f; + m11 = 1.0f; + return this; + } + + /** + * Set this matrix to 0. + * @return this + */ + public Matrix2f zero() { + m00 = 0.0f; + m01 = 0.0f; + m10 = 0.0f; + m11 = 0.0f; + return this; + } + } Index: Vector3f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector3f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector3f.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Vector3f.java 16 Aug 2002 21:52:26 -0000 1.2 +++ Vector3f.java 24 Aug 2002 21:12:31 -0000 1.3 @@ -31,6 +31,8 @@ */ package org.lwjgl.vector; +import org.lwjgl.Math; + /** * $Id$ * @@ -50,5 +52,134 @@ public Vector3f() { super(); } + + /** + * Constructor + */ + public Vector3f(Vector3f src) { + set(src); + } + + /** + * Constructor + */ + public Vector3f(float x, float y, float z) { + set(x, y, z); + } + /** + * Set values + * @return this + */ + public Vector3f set(float x, float y, float z) { + this.x = x; + this.y = y; + this.z = z; + return this; + } + + /** + * Load from another Vector3f + * @param src The source vector + * @return this + */ + public Vector3f set(Vector3f src) { + x = src.x; + y = src.y; + z = src.z; + return this; + } + + /** + * @return the length of the vector + */ + public float length() { + return Math.sqrt(lengthSquared()); + } + + /** + * @return the length squared of the vector + */ + public float lengthSquared() { + return x * x + y * y + z * z; + } + + /** + * Translate a vector + * @param x The translation in x + * @param y the translation in y + * @return this + */ + public Vector3f translate(float x, float y, float z) { + this.x += x; + this.y += y; + this.z += z; + return this; + } + + /** + * Negate a vector + * @return this + */ + public Vector3f negate() { + x = -x; + y = -y; + z = -z; + return this; + } + + /** + * Normalise this vector + * @return this + */ + public Vector3f normalise() { + float l = 1.0f / length(); + x *= l; + y *= l; + z *= l; + return this; + } + + /** + * Normalise this vector and place the result in another vector. + * @param dest The destination vector, or null if a new vector is to be created + * @return the normalised vector + */ + public Vector3f normalise(Vector3f dest) { + float l = length(); + + if (dest == null) + dest = new Vector3f(x / l, y / l, z / l); + else + dest.set(x / l, y / l, z / l); + + return dest; + } + + /** + * The dot product of two vectors is calculated as + * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + * @param left The LHS vector + * @param right The RHS vector + * @return left dot right + */ + public static float dot(Vector3f left, Vector3f right) { + return left.x * right.x + left.y * right.y + left.z * right.z; + } + + /** + * Calculate the angle between two vectors, in degrees + * @param a A vector + * @param b The other vector + * @return the angle between the two vectors, in degrees + */ + public static float angle(Vector3f a, Vector3f b) { + float dls = dot(a, b) / (a.length() * b.length()); + if (dls < -1f) + dls = -1f; + else if (dls > 1.0f) + dls = 1.0f; + return Math.acos(dls); + } + } Index: Matrix4f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix4f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix4f.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Matrix4f.java 16 Aug 2002 21:52:26 -0000 1.2 +++ Matrix4f.java 24 Aug 2002 21:12:31 -0000 1.3 @@ -37,14 +37,371 @@ * @author foo */ public class Matrix4f { + /** + * Set this matrix to be the identity matrix. + * @return this + */ + public Matrix4f setIdentity() { + m00 = 1.0f; + m01 = 0.0f; + m02 = 0.0f; + m03 = 0.0f; + m10 = 0.0f; + m11 = 1.0f; + m12 = 0.0f; + m13 = 0.0f; + m20 = 0.0f; + m21 = 0.0f; + m22 = 1.0f; + m23 = 0.0f; + m30 = 0.0f; + m31 = 0.0f; + m32 = 0.0f; + m33 = 1.0f; + + return this; + } + + + /** + * Set this matrix to 0. + * @return this + */ + public Matrix4f setZero() { + m00 = 0.0f; + m01 = 0.0f; + m02 = 0.0f; + m03 = 0.0f; + m10 = 0.0f; + m11 = 0.0f; + m12 = 0.0f; + m13 = 0.0f; + m20 = 0.0f; + m21 = 0.0f; + m22 = 0.0f; + m23 = 0.0f; + m30 = 0.0f; + m31 = 0.0f; + m32 = 0.0f; + m33 = 0.0f; + + return this; + } + + - public float m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33; + public float m00 = 1.0f, m01, m02, m03, m10, m11 = 1.0f, m12, m13, m20, m21, m22 = 1.0f, m23, m30, m31, m32, m33 = 1.0f; /** * Construct a Matrix4f */ public Matrix4f() { super(); + } + /** + * Load from another matrix4f + * @param src The source matrix + * @return this + */ + public Matrix4f load(Matrix4f src) { + + m00 = src.m00; + m01 = src.m01; + m02 = src.m02; + m03 = src.m03; + m10 = src.m10; + m11 = src.m11; + m12 = src.m12; + m13 = src.m13; + m20 = src.m20; + m21 = src.m21; + m22 = src.m22; + m23 = src.m23; + m30 = src.m30; + m31 = src.m31; + m32 = src.m32; + m33 = src.m33; + + return this; + } + /** + * Add two matrices together and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix4f add(Matrix4f left, Matrix4f right, Matrix4f dest) { + + Matrix4f temp = null; + + if (dest == null) + dest = new Matrix4f(); + else if (dest == left || dest == right) { + temp = dest; + dest = new Matrix4f(); + } + + dest.m00 = left.m00 + right.m00; + dest.m01 = left.m01 + right.m01; + dest.m02 = left.m02 + right.m02; + dest.m03 = left.m03 + right.m03; + dest.m10 = left.m10 + right.m10; + dest.m11 = left.m11 + right.m11; + dest.m12 = left.m12 + right.m12; + dest.m13 = left.m13 + right.m13; + dest.m20 = left.m20 + right.m20; + dest.m21 = left.m21 + right.m21; + dest.m22 = left.m22 + right.m22; + dest.m23 = left.m23 + right.m23; + dest.m30 = left.m30 + right.m30; + dest.m31 = left.m31 + right.m31; + dest.m32 = left.m32 + right.m32; + dest.m33 = left.m33 + right.m33; + + + if (temp != null) { + temp.load(dest); + return temp; + } else + return dest; + } + + /** + * Subtract the right matrix from the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix4f sub(Matrix4f left, Matrix4f right, Matrix4f dest) { + + Matrix4f temp = null; + + if (dest == null) + dest = new Matrix4f(); + else if (dest == left || dest == right) { + temp = dest; + dest = new Matrix4f(); + } + + dest.m00 = left.m00 - right.m00; + dest.m01 = left.m01 - right.m01; + dest.m02 = left.m02 - right.m02; + dest.m03 = left.m03 - right.m03; + dest.m10 = left.m10 - right.m10; + dest.m11 = left.m11 - right.m11; + dest.m12 = left.m12 - right.m12; + dest.m13 = left.m13 - right.m13; + dest.m20 = left.m20 - right.m20; + dest.m21 = left.m21 - right.m21; + dest.m22 = left.m22 - right.m22; + dest.m23 = left.m23 - right.m23; + dest.m30 = left.m30 - right.m30; + dest.m31 = left.m31 - right.m31; + dest.m32 = left.m32 - right.m32; + dest.m33 = left.m33 - right.m33; + + if (temp != null) { + temp.load(dest); + return temp; + } else + return dest; + } + + /** + * Multiply the right matrix by the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix4f mul(Matrix4f left, Matrix4f right, Matrix4f dest) { + + Matrix4f temp = null; + + if (dest == null) + dest = new Matrix4f(); + else if (dest == left || dest == right) { + temp = dest; + dest = new Matrix4f(); + } + + + dest.m00 = left.m00 * right.m00 + left.m10 * right.m01 + left.m20 * right.m02 + left.m30 * right.m03; + dest.m01 = left.m01 * right.m00 + left.m11 * right.m01 + left.m21 * right.m02 + left.m31 * right.m03; + dest.m02 = left.m02 * right.m00 + left.m12 * right.m01 + left.m22 * right.m02 + left.m32 * right.m03; + dest.m03 = left.m03 * right.m00 + left.m13 * right.m01 + left.m23 * right.m02 + left.m33 * right.m03; + dest.m10 = left.m00 * right.m10 + left.m10 * right.m11 + left.m20 * right.m12 + left.m30 * right.m13; + dest.m11 = left.m01 * right.m10 + left.m11 * right.m11 + left.m21 * right.m12 + left.m31 * right.m13; + dest.m12 = left.m02 * right.m10 + left.m12 * right.m11 + left.m22 * right.m12 + left.m32 * right.m13; + dest.m13 = left.m03 * right.m10 + left.m13 * right.m11 + left.m23 * right.m12 + left.m33 * right.m13; + dest.m20 = left.m00 * right.m20 + left.m10 * right.m21 + left.m20 * right.m22 + left.m30 * right.m23; + dest.m21 = left.m01 * right.m20 + left.m11 * right.m21 + left.m21 * right.m22 + left.m31 * right.m23; + dest.m22 = left.m02 * right.m20 + left.m12 * right.m21 + left.m22 * right.m22 + left.m32 * right.m23; + dest.m23 = left.m03 * right.m20 + left.m13 * right.m21 + left.m23 * right.m22 + left.m33 * right.m23; + dest.m30 = left.m00 * right.m30 + left.m10 * right.m31 + left.m20 * right.m32 + left.m30 * right.m33; + dest.m31 = left.m01 * right.m30 + left.m11 * right.m31 + left.m21 * right.m32 + left.m31 * right.m33; + dest.m32 = left.m02 * right.m30 + left.m12 * right.m31 + left.m22 * right.m32 + left.m32 * right.m33; + dest.m33 = left.m03 * right.m30 + left.m13 * right.m31 + left.m23 * right.m32 + left.m33 * right.m33; + + if (temp != null) { + temp.load(dest); + return temp; + } else + return dest; + } + + /** + * Multiply a Vector by a matrix and return the result in a destination + * vector. + * @param left The left matrix + * @param right The right vector + * @param dest The destination vector, or null if a new one is to be created + * @return the destination vector + */ + public static Vector4f mul(Matrix4f left, Vector4f right, Vector4f dest) { + + Vector4f temp = null; + + if (dest == null) + dest = new Vector4f(); + else if (dest == right) { + temp = dest; + dest = new Vector4f(); + } + + + dest.x = left.m00 * right.x + left.m10 * right.y + left.m20 * right.z + left.m30 * right.w; + dest.y = left.m01 * right.x + left.m11 * right.y + left.m21 * right.z + left.m31 * right.w; + dest.z = left.m02 * right.x + left.m12 * right.y + left.m22 * right.z + left.m32 * right.w; + dest.w = left.m03 * right.x + left.m13 * right.y + left.m23 * right.z + left.m33 * right.w; + + if (temp != null) { + temp.set(dest); + return temp; + } else + return dest; + } + + /** + * Transpose this matrix + * @return this + */ + public Matrix4f transpose() { + + float f = m10; + m10 = m01; + m01 = f; + f = m20; + m20 = m02; + m02 = f; + f = m30; + m30 = m03; + m03 = f; + f = m21; + m21 = m12; + m12 = f; + f = m31; + m31 = m13; + m13 = f; + f = m32; + m32 = m23; + m23 = f; + + return this; + } + + /** + * Transpose this matrix and place the result in another matrix + * @param dest The destination matrix or null if a new matrix is to be created + * @return the transposed matrix + */ + public Matrix4f transpose(Matrix4f dest) { + + if (this != dest) { + m00 = dest.m00; + m01 = dest.m10; + m02 = dest.m20; + m03 = dest.m30; + m10 = dest.m01; + m11 = dest.m11; + m12 = dest.m21; + m13 = dest.m31; + m20 = dest.m02; + m21 = dest.m12; + m22 = dest.m22; + m23 = dest.m32; + m30 = dest.m03; + m31 = dest.m13; + m32 = dest.m23; + m33 = dest.m33; + } else + transpose(); + + return dest; + } + + + /** + * Invert this matrix + * @return this + */ + public Matrix4f invert() { + return this; + } + + /** + * Negate this matrix + * @return this + */ + public Matrix4f negate() { + m00 = -m00; + m01 = -m01; + m02 = -m02; + m03 = -m03; + m10 = -m10; + m11 = -m11; + m12 = -m12; + m13 = -m13; + m20 = -m20; + m21 = -m21; + m22 = -m22; + m23 = -m23; + m30 = -m30; + m31 = -m31; + m32 = -m32; + m33 = -m33; + return this; + } + + /** + * Negate this matrix and place the result in a destination matrix. + * @param dest The destination matrix, or null if a new matrix is to be created + * @return the negated matrix + */ + public Matrix4f negate(Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + + dest.m00 = -m00; + dest.m01 = -m01; + dest.m02 = -m02; + dest.m03 = -m03; + dest.m10 = -m10; + dest.m11 = -m11; + dest.m12 = -m12; + dest.m13 = -m13; + dest.m20 = -m20; + dest.m21 = -m21; + dest.m22 = -m22; + dest.m23 = -m23; + dest.m30 = -m30; + dest.m31 = -m31; + dest.m32 = -m32; + dest.m33 = -m33; + + return dest; } } Index: Vector2f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector2f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector2f.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Vector2f.java 16 Aug 2002 21:52:26 -0000 1.2 +++ Vector2f.java 24 Aug 2002 21:12:31 -0000 1.3 @@ -31,6 +31,8 @@ */ package org.lwjgl.vector; +import org.lwjgl.Math; + /** * $Id$ * @@ -45,10 +47,134 @@ public float x, y; /** - * Constructor for Vector2f. + * Constructor for Vector3f. */ public Vector2f() { super(); } + + /** + * Constructor + */ + public Vector2f(Vector2f src) { + set(src); + } + + /** + * Constructor + */ + public Vector2f(float x, float y) { + set(x, y); + } + + /** + * Set values + * @return this + */ + public Vector2f set(float x, float y) { + this.x = x; + this.y = y; + return this; + } + /** + * Load from another Vector2f + * @param src The source vector + * @return this + */ + public Vector2f set(Vector2f src) { + x = src.x; + y = src.y; + return this; + } + + /** + * @return the length of the vector + */ + public float length() { + return Math.sqrt(lengthSquared()); + } + + /** + * @return the length squared of the vector + */ + public float lengthSquared() { + return x * x + y * y; + } + + /** + * Translate a vector + * @param x The translation in x + * @param y the translation in y + * @return this + */ + public Vector2f translate(float x, float y) { + this.x += x; + this.y += y; + return this; + } + + /** + * Negate a vector + * @return this + */ + public Vector2f negate() { + x = -x; + y = -y; + return this; + } + + /** + * Normalise this vector + * @return this + */ + public Vector2f normalise() { + float l = 1.0f / length(); + x *= l; + y *= l; + return this; + } + + /** + * Normalise this vector and place the result in another vector. + * @param dest The destination vector, or null if a new vector is to be created + * @return the normalised vector + */ + public Vector2f normalise(Vector2f dest) { + float l = length(); + + if (dest == null) + dest = new Vector2f(x / l, y / l); + else + dest.set(x / l, y / l); + + return dest; + } + + /** + * The dot product of two vectors is calculated as + * v1.x * v2.x + v1.y * v2.y + * @param left The LHS vector + * @param right The RHS vector + * @return left dot right + */ + public static float dot(Vector2f left, Vector2f right) { + return left.x * right.x + left.y * right.y; + } + + /** + * Calculate the angle between two vectors, in degrees + * @param a A vector + * @param b The other vector + * @return the angle between the two vectors, in degrees + */ + public static float angle(Vector2f a, Vector2f b) { + float dls = dot(a, b) / (a.length() * b.length()); + if (dls < -1f) + dls = -1f; + else if (dls > 1.0f) + dls = 1.0f; + return Math.acos(dls); + } + } Index: Vector4f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector4f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector4f.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Vector4f.java 16 Aug 2002 21:52:26 -0000 1.2 +++ Vector4f.java 24 Aug 2002 21:12:31 -0000 1.3 @@ -31,6 +31,8 @@ */ package org.lwjgl.vector; +import org.lwjgl.Math; + /** * $Id$ * @@ -50,5 +52,139 @@ public Vector4f() { super(); } + + /** + * Constructor + */ + public Vector4f(Vector4f src) { + set(src); + } + + /** + * Constructor + */ + public Vector4f(float x, float y, float z, float w) { + set(x, y, z, w); + } + + /** + * Set values + * @return this + */ + public Vector4f set(float x, float y, float z, float w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + return this; + } + /** + * Load from another Vector4f + * @param src The source vector + * @return this + */ + public Vector4f set(Vector4f src) { + x = src.x; + y = src.y; + z = src.z; + w = src.w; + return this; + } + + /** + * @return the length of the vector + */ + public float length() { + return Math.sqrt(lengthSquared()); + } + + /** + * @return the length squared of the vector + */ + public float lengthSquared() { + return x * x + y * y + z * z + w * w; + } + + /** + * Translate a vector + * @param x The translation in x + * @param y the translation in y + * @return this + */ + public Vector4f translate(float x, float y, float z, float w) { + this.x += x; + this.y += y; + this.z += z; + this.w += w; + return this; + } + + /** + * Negate a vector + * @return this + */ + public Vector4f negate() { + x = -x; + y = -y; + z = -z; + w = -w; + return this; + } + + /** + * Normalise this vector + * @return this + */ + public Vector4f normalise() { + float l = 1.0f / length(); + x *= l; + y *= l; + z *= l; + w *= l; + return this; + } + + /** + * Normalise this vector and place the result in another vector. + * @param dest The destination vector, or null if a new vector is to be created + * @return the normalised vector + */ + public Vector4f normalise(Vector4f dest) { + float l = length(); + + if (dest == null) + dest = new Vector4f(x / l, y / l, z / l, w / l); + else + dest.set(x / l, y / l, z / l, w / l); + + return dest; + } + + /** + * The dot product of two vectors is calculated as + * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + v1.w * v2.w + * @param left The LHS vector + * @param right The RHS vector + * @return left dot right + */ + public static float dot(Vector4f left, Vector4f right) { + return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; + } + + /** + * Calculate the angle between two vectors, in degrees + * @param a A vector + * @param b The other vector + * @return the angle between the two vectors, in degrees + */ + public static float angle(Vector4f a, Vector4f b) { + float dls = dot(a, b) / (a.length() * b.length()); + if (dls < -1f) + dls = -1f; + else if (dls > 1.0f) + dls = 1.0f; + return Math.acos(dls); + } + } Index: Matrix3f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix3f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix3f.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Matrix3f.java 16 Aug 2002 21:52:26 -0000 1.2 +++ Matrix3f.java 24 Aug 2002 21:12:31 -0000 1.3 @@ -42,13 +42,308 @@ public class Matrix3f { - public float m00, m01, m02, m10, m11, m12, m20, m21, m22; - + public float m00 = 1.0f, + m01, + m02, + m10, + m11 = 1.0f, + m12, + m20, + m21, + m22 = 1.0f; + /** * Constructor for Matrix3f. */ public Matrix3f() { super(); + } + /** + * Load from another matrix3f + * @param src The source matrix + * @return this + */ + public Matrix3f load(Matrix3f src) { + + m00 = src.m00; + m10 = src.m10; + m20 = src.m20; + m01 = src.m01; + m11 = src.m11; + m21 = src.m21; + m02 = src.m02; + m12 = src.m12; + m22 = src.m22; + + return this; + } + + /** + * Add two matrices together and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix3f add(Matrix3f left, Matrix3f right, Matrix3f dest) { + + Matrix3f temp = null; + + if (dest == null) + dest = new Matrix3f(); + else if (dest == left || dest == right) { + temp = dest; + dest = new Matrix3f(); + } + + dest.m00 = left.m00 + right.m00; + dest.m01 = left.m01 + right.m01; + dest.m02 = left.m02 + right.m02; + dest.m10 = left.m10 + right.m10; + dest.m11 = left.m11 + right.m11; + dest.m12 = left.m12 + right.m12; + dest.m20 = left.m20 + right.m20; + dest.m21 = left.m21 + right.m21; + dest.m22 = left.m22 + right.m22; + + if (temp != null) { + temp.load(dest); + return temp; + } else + return dest; + } + + /** + * Subtract the right matrix from the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix3f sub(Matrix3f left, Matrix3f right, Matrix3f dest) { + + Matrix3f temp = null; + + if (dest == null) + dest = new Matrix3f(); + else if (dest == left || dest == right) { + temp = dest; + dest = new Matrix3f(); + } + + dest.m00 = left.m00 - right.m00; + dest.m01 = left.m01 - right.m01; + dest.m02 = left.m02 - right.m02; + dest.m10 = left.m10 - right.m10; + dest.m11 = left.m11 - right.m11; + dest.m12 = left.m12 - right.m12; + dest.m20 = left.m20 - right.m20; + dest.m21 = left.m21 - right.m21; + dest.m22 = left.m22 - right.m22; + + if (temp != null) { + temp.load(dest); + return temp; + } else + return dest; + } + + /** + * Multiply the right matrix by the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix3f mul(Matrix3f left, Matrix3f right, Matrix3f dest) { + + Matrix3f temp = null; + + if (dest == null) + dest = new Matrix3f(); + else if (dest == left || dest == right) { + temp = dest; + dest = new Matrix3f(); + } + + dest.m00 = + left.m00 * right.m00 + left.m10 * right.m01 + left.m20 * right.m02; + dest.m01 = + left.m01 * right.m00 + left.m11 * right.m01 + left.m21 * right.m02; + dest.m02 = + left.m02 * right.m00 + left.m12 * right.m01 + left.m22 * right.m02; + dest.m10 = + left.m00 * right.m10 + left.m10 * right.m11 + left.m20 * right.m12; + dest.m11 = + left.m01 * right.m10 + left.m11 * right.m11 + left.m21 * right.m12; + dest.m12 = + left.m02 * right.m10 + left.m12 * right.m11 + left.m22 * right.m12; + dest.m20 = + left.m00 * right.m20 + left.m10 * right.m21 + left.m20 * right.m22; + dest.m21 = + left.m01 * right.m20 + left.m11 * right.m21 + left.m21 * right.m22; + dest.m22 = + left.m02 * right.m20 + left.m12 * right.m21 + left.m22 * right.m22; + + if (temp != null) { + temp.load(dest); + return temp; + } else + return dest; + } + + /** + * Multiply a Vector by a matrix and return the result in a destination + * vector. + * @param left The left matrix + * @param right The right vector + * @param dest The destination vector, or null if a new one is to be created + * @return the destination vector + */ + public static Vector3f mul(Matrix3f left, Vector3f right, Vector3f dest) { + + Vector3f temp = null; + + if (dest == null) + dest = new Vector3f(); + else if (dest == right) { + temp = dest; + dest = new Vector3f(); + } + + dest.x = left.m00 * right.x + left.m10 * right.y + left.m20 * right.z; + dest.y = left.m01 * right.x + left.m11 * right.y + left.m21 * right.z; + dest.z = left.m02 * right.x + left.m12 * right.y + left.m22 * right.z; + + if (temp != null) { + temp.set(dest); + return temp; + } else + return dest; + } + + /** + * Transpose this matrix + * @return this + */ + public Matrix3f transpose() { + float f = m10; + m10 = m01; + m01 = f; + f = m20; + m20 = m02; + m02 = f; + f = m21; + m21 = m12; + m12 = f; + return this; + } + + /** + * Transpose this matrix and place the result in another matrix + * @param dest The destination matrix or null if a new matrix is to be created + * @return the transposed matrix + */ + public Matrix3f transpose(Matrix3f dest) { + + if (dest == null) + dest = new Matrix3f(); + + if (this != dest) { + m00 = dest.m00; + m01 = dest.m10; + m02 = dest.m20; + m10 = dest.m01; + m11 = dest.m11; + m12 = dest.m21; + m20 = dest.m02; + m21 = dest.m12; + m22 = dest.m22; + } else + transpose(); + + return this; + + } + + /** + * Invert this matrix + * @return this + */ + public Matrix3f invert() { + return this; + } + + /** + * Negate this matrix + * @return this + */ + public Matrix3f negate() { + m00 = -m00; + m01 = -m02; + m02 = -m01; + m10 = -m10; + m11 = -m12; + m12 = -m11; + m20 = -m20; + m21 = -m22; + m22 = -m21; + return this; + } + + /** + * Negate this matrix and place the result in a destination matrix. + * @param dest The destination matrix, or null if a new matrix is to be created + * @return the negated matrix + */ + public Matrix3f negate(Matrix3f dest) { + if (dest == null) + dest = new Matrix3f(); + + dest.m00 = -m00; + dest.m01 = -m02; + dest.m02 = -m01; + dest.m10 = -m10; + dest.m11 = -m12; + dest.m12 = -m11; + dest.m20 = -m20; + dest.m21 = -m22; + dest.m22 = -m21; + return dest; + } + + /** + * Set this matrix to be the identity matrix. + * @return this + */ + public Matrix3f setIdentity() { + m00 = 1.0f; + m01 = 0.0f; + m02 = 0.0f; + m10 = 0.0f; + m11 = 1.0f; + m12 = 0.0f; + m20 = 0.0f; + m21 = 0.0f; + m22 = 1.0f; + return this; + } + + /** + * Set this matrix to 0. + * @return this + */ + public Matrix3f setZero() { + m00 = 0.0f; + m01 = 0.0f; + m02 = 0.0f; + m10 = 0.0f; + m11 = 0.0f; + m12 = 0.0f; + m20 = 0.0f; + m21 = 0.0f; + m22 = 0.0f; + return this; } } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 16:34:43
|
Update of /cvsroot/java-game-lib/LWJGL/doc/tutorial In directory usw-pr-cvs1:/tmp/cvs-serv28532/doc/tutorial Added Files: skeleton_code.html Log Message: Rough incomplete draft --- NEW FILE: skeleton_code.html --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/doc/tutorial/skeleton_code.html <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>4</title> </head> <body> <p>4.0 Skeleton Game Code</p> <p>So now you want to know how to just get stuck in and start writing games. First you need to understand a couple of game programming design patterns and why they'll make your life easier; and then you'll want to fill in the gaps in a bit of skeleton code that we're going to discuss below.</p> <p>4.1 Design Decisions</p> <p>4.1.1 Static Game Class</p> <p>How many instances of your game do you expect to be running in a JVM? One, and only one. Given this, you may feel the urge to implement the singleton pattern on your game, where your game class holds a single instance of itself and a method to retrieve that instance, something like:</p> <p style="background-color: #FFFFCC; border-style: solid; border-width: 1; padding: 3"><code>public class Game {</code><code><br> <br> /** The single instance of the Game */<br> private final Game game = new Game();<br> <br> /** Don't allow construction from anywhere else */<br> private Game() {</code><code><br> }<br> </code><code><br> /** @return the game instance */<br> public static Game getGame() {<br> return game;</code><code><br> }<br> <br> /** Start a new game */<br> public void newGame() {<br> // etc<br> }<br> <br> /** The main game loop */<br> public void mainLoop() {<br> // etc<br> }<br> <br> // etc<br> }</code></p> <p>However this does result in code all over your application calling Game.getGame().someMethod() - and to what end? It might <i>look</i> like object-oriented code but in reality you're just making things harder for yourself. It's far more intuitive to write your class purely statically, like this:</p> <p style="background-color: #FFFFCC; border-style: solid; border-width: 1; padding: 3"><code>public class Game {</code><code><br> <br> /** Don't allow construction from anywhere else */<br> private Game() {</code><code><br> }<br> <br> /** Start a new game */<br> public static void newGame() {<br> // etc<br> }<br> <br> /** The main game loop */<br> public static void mainLoop() {<br> // etc<br> }<br> <br> // etc<br> }</code></p> <p>Now you can just call your methods directly on the Game class. We're going to use this pattern in the forthcoming skeleton game code.</p> <p>4.1.2 About Threads and Timeslicing</p> <p>There is a tendency for Java programs to be heavily multithreaded, simply because you <i>can</i> in Java, whereas it is exceedingly difficult to do properly in C++. However, you are likely to fall into a number of pitfalls in game programming above and beyond those experienced in general multithreaded programming:</p> <p>Firstly, threads were designed a long time ago for a specific purpose, and that purpose is keeping the processor busy whilst some slow I/O operation is being carried out. How many slow I/O operations are you going to do in your game? Apart from loading the graphics, sounds, and level data at the start - none (unless you're doing networking but that's a whole other issue).</p> <p>What does this mean for you? Well, in normal Java, programmers will tend to set off a number of threads and expect them to more or less behave like <i>time slices</i> rather than <i>threads.</i> Time slices work in a rather different way to threads: each is executed, in turn, for a finite amount of time. You can more or less guarantee that a slice will execute for its allotted time, and that all slices will get a look-in.</p> <p>Threads don't work like this. To put it bluntly, you can't <i>accurately</i> predict when a thread is going to execute (or if it will ever be executed), or even how long it will execute for. Therefore you should not be using threads to do stuff that you expect to occur in a timely fashion. This includes <i>collision detection, animation, sound playback</i> and <i>device input, </i>and the ultimate blow, <i>event handling.</i></p> <p>In the absence of threads to do this useful stuff, we have to resort to a <i>single-threaded model</i> where the game effectively runs in one, very busy, thread - the "main loop". This is quite convenient, however, because it highlights another problem with multithreaded game code that is not immediately obvious.</p> <p>4.1.3 About Threads and Hardware</p> <p>Your machine's <i>hardware</i> is only ever in <i>one state at a time, </i>unless it is some kind of quantum computer. The device drivers for the hardware - namely OpenGL and the like - keep track of this state in order to send the correct hardware setup commands to the device. Can you imagine what might happen if one thread is trying to do some drawing at the same time that another thread is trying to do some drawing? Yes, you get a mess. You will discover that in order to draw in a thread in OpenGL that you need to associate the current rendering thread with the current state of the hardware (the "context"). Suddenly you need to synchronize every method which can alter the hardware state. Suddenly your application looks <i>incredibly complicated</i> and <i>runs like a dog!</i> So much for threads.</p> <p>So be aware of this next time you think it's a good idea to load your textures in a background thread, and remember that only one thread - the main thread - is allowed to execute any commands on your hardware devices.</p> <p>It is for this reason that we use <i>polling </i>to read input devices as well. Not to mention the fact that we can't guarantee that an event loop will be executed every game frame, and so our input will be erratic.</p> <p>4.1.4 Object-orientation</p> <p>Object-orientation is <i>good</i> when it's done right. It makes your code much, much, easier to understand and work on. However you may be led astray by <i>parrots who repeat mantras.</i> There are some programmers that say <i>everything should be private</i> and you should expose your instance variables with getters and setters. The Hotspot virtual machine is even cleverly optimised to make this operation almost entirely free. <i>But wait! </i>Ask yourself why you're filling your classes up with getters and setters <i>when a dot would do the same job without any need to maintain it.</i></p> <p>You're writing a game: the source code is probably only going to be used once, or by a very few people. Most of your game code is so unique to your actual game that it is <i>disposable code.</i> So save yourself some effort and use a dot if you can. A critical mistake I have observed time and time again in object-oriented projects is to get so bogged down trying to design a perfect object-oriented model that the project takes absolutely ages to design. Before you know it there are hundreds of getters and setters to maintain, and interfaces all over the place to keep the reuse of your classes to a maximum - when <i>all along the project design goal was not reuse but to get the bloody thing finished on time and under budget!</i></p> <p>Your mileage may vary...</p> <p>4.2 Show Me The Money</p> <p>Ok, ok, without further ado, here is a skeleton listing which you can use to write a fullscreen Java game using LWJGL. Because we're games programmers, we don't want to do a Hello World as we'd probably rather shoot it. But before we can make bullets we must pay homage to the <i>rotating square!</i></p> <p style="background-color: #FFFFCC; border-style: solid; border-width: 1; padding: 3"><code>public final class Game {<br> static {<br> try {<br> DisplayMode[] modes = Display.getAvailableDisplayModes();<br> System.out.println("Available display modes:");<br> for (int i = 0; i < modes.length; i ++)<br> System.out.println(modes[i]);<br> // For now let's just pick a mode we're certain to have<br> Display.create(new DisplayMode(640, 480, 16, 60), true);<br> System.out.println("Created display.");<br> } catch (Exception e) {<br> System.err.println("Failed to create display due to "+e);<br> System.exit(1);<br> }<br> }<br> public static final GL gl = new GL(16, 0, 16, 8);<br> static {<br> try {<br> gl.create();<br> System.out.println("Created OpenGL.");<br> } catch (Exception e) {<br> System.err.println("Failed to create OpenGL due to "+e);<br> System.exit(1);<br> }<br> }<br> /** A handy number formatter for use displaying FPS and the like */<br> public static NumberFormat fmt = new DecimalFormat();<br> static {<br> fmt.setMaximumFractionDigits(1);<br> fmt.setMinimumFractionDigits(1);<br> fmt.setGroupingUsed(false);<br> }<br> /** Is the game finished? */<br> private static boolean finished;<br> /** A rotating square! */<br> private static float angle;<br> /**<br> * No construction allowed<br> */<br> private Game() {<br> }<br> public static void main(String[] arguments) {<br> try {<br> init();<br> int frames = 0;<br> float fps = 0.0f;<br> Timer timer = new Timer();<br> timer.reset();<br> timer.resume();<br> while (!finished) {<br> AbsMouse.poll();<br> Keyboard.poll();<br> Keyboard.read();<br> gl.clear(GL.COLOR_BUFFER_BIT);<br> mainLoop();<br> render();<br> gl.swapBuffers();<br> // Count the frames per second. Do with this what you will..<br> frames++;<br> float time = timer.getTime();<br> if (time >= 1.0f) {<br> fps = (int) (frames / time);<br> timer.reset();<br> frames = 0;<br> }<br> }<br> } catch (Throwable t) {<br> t.printStackTrace();<br> } finally {<br> cleanup();<br> }<br> }<br> <br> /**<br> * All calculations are done in here<br> */<br> private static void mainLoop() {<br> angle += 1f;<br> if (angle > 360.0f)<br> angle = 0.0f;<br> <br> if (Keyboard.isKeyDown(Keyboard.KEY_ESCAPE))<br> finished = true;<br> }<br> <br> /**<br> * All rendering is done in here<br> */<br> private static void render() {<br> <br> gl.pushMatrix();<br> gl.translatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);<br> gl.rotatef(angle, 0, 0, 1.0f);<br> gl.begin(GL.QUADS);<br> gl.vertex2i(-50, -50);<br> gl.vertex2i(50, -50);<br> gl.vertex2i(50, 50);<br> gl.vertex2i(-50, 50);<br> gl.end();<br> gl.popMatrix();<br> }<br> /**<br> * Initialize<br> */<br> private static void init() throws Exception {<br> Keyboard.create();<br> Keyboard.enableBuffer();<br> Mouse.create();<br> // Go into orthographic projection mode.<br> gl.matrixMode(GL.PROJECTION);<br> gl.loadIdentity();<br> gl.glu.ortho2D(0, Display.getWidth(), 0, Display.getHeight());<br> gl.matrixMode(GL.MODELVIEW);<br> gl.loadIdentity();<br> gl.viewport(0, 0, Display.getWidth(), Display.getHeight());<br> // Fix the refresh rate to the display frequency.<br> gl.wglSwapIntervalEXT(1);<br> }<br> /**<br> * Cleanup<br> */<br> private static void cleanup() {<br> Keyboard.destroy();<br> Mouse.destroy();<br> gl.destroy();<br> Display.destroy();<br> }<br> }</code></p> </body> </html> |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 16:34:21
|
Update of /cvsroot/java-game-lib/LWJGL/doc/tutorial In directory usw-pr-cvs1:/tmp/cvs-serv28445/doc/tutorial Added Files: index.html Log Message: Rough incomplete draft --- NEW FILE: index.html --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/doc/tutorial/index.html <html> <head> <meta http-equiv="Content-Language" content="en-gb"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Lightweight Java Game Library Tutorial Index</title> <style> <!-- .document_title { text-align: Center; font-size: 24pt; letter-spacing: 4 } .code_snippet { font-family: Courier New } --> </style> </head> <body> <p class="document_title">Lightweight Java Game Library</p> <p class="document_title">Tutorial</p> <p align="center">Written by Caspian Rychlik-Prince</p> <p align="center">Please direct comments, errata, and flames to the author at <a href="mailto:ci...@us...">ci...@us...</a></p> <p align="center">Last modified <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->23 August 2002<!--webbot bot="Timestamp" endspan i-checksum="31308" --> </p> <p> </p> <p><a name="Introduction">1.0 Introduction</a></p> <p>The Lightweight Java Game Library (LWJGL) is a solution aimed directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java. This tutorial is nonetheless aimed at <i>experienced </i>programmers and won't be explaining some obvious techniques. Currently the LWJGL supports only the Win32 platform, and JDK1.4. </p> <p>LWJGL is not meant to make writing games particularly <i>easy;</i> it is primarily an <i>enabling technology </i>which allows developers to get at resources that are simply otherwise unavailable or poorly implemented on the existing Java platform. We anticipate that the LWJGL will, through evolution and extension, become the foundation for more complete game libraries and "game engines" as they have popularly become known, and hide some of the new evils we have had to expose in the APIs.</p> <p>2.0 Contents</p> <p> </p> <p>3.0 Aims & Design</p> <p>Because the LWJGL API is not meant to be a fully featured game engine it has been ruthlessly pruned of all non-essential code. Its ultimate philosophy is that it provides the <i>bare minimum</i> of API functionality which will let a game programmer produce games in Java without having to write native code in order to get <i>performance </i>or <i>access some hardware feature not exposed by Java 2</i>. We settled on using two other open technologies as our major foundations, namely OpenGL and OpenAL for graphics and sound respectively.</p> <p>A sub-requirement of the LWJGL is that it be freed Java programmers from the requirement to ship a whole JRE with their games. Currently the Sun licensing terms dictate that J2SE be shipped in its entirety, even for the tiniest of demos. As this could easily triple the size of a demo and discourage end users with configuration issues we have made it a primary concern that games written using LWJGL can be compiled into completely standalone native binary executables by compilers such as GNU's GCJ and Excelsior's JET. We have done this by implementing the library in such a way that <i>no dependencies </i>on Sun's proprietry JRE binaries are present in the library.</p> <p>The final aim of LWJGL is to make the library available for Win32 systems above all others, for that is what most commercial programmers need.</p> <p>Linuxians and Macophiles do not despair! There's nothing inherently non-portable about the LWJGL - we just don't have the time and expertise to do it yet. But it will happen.</p> <p>3.1 General API</p> <p>The general API gives us the foundations of game programming: we have a Display class, for initialising the display and querying its available modes; we have a Math class to provide us with some floating point maths functions (rather than the double-precision ones provided by Java), and matrix batch operations; and a Sys class, which gives us our <i>most useful gaming functions:</i> the ability to get the address of a direct byte buffer so we can cache it on the Java side of the JNI barrier, and hence access all those lovely hardware calls we need for performance; and the ability to use the system's <i>hires timer</i>, which is so critical for animation timing. In addition we can also create a direct byte buffer at <i>any address in memory.</i></p> <p>The Evil Of Pointers And What It Means For Security</p> <p>Yes, we have exposed <i>pointers</i> to Java programmers. Yes, you can write to just about any bit of memory you so please, and cause untold havoc. You can break things. You can bypass security constraints and exploit the dreaded <i>buffer vuln.</i></p> <p>But <i>why?</i> Because without pointers, all those nice easy native API calls would suddenly become complex and behave slightly differently to their C counterparts, and require us to pass direct ByteBuffers to JNI for every call. This requires that every single call which takes a pointer calls the JNI method GetDirectBufferAddress every time, which is an unnecessary overhead.</p> <p>The implications for security are simple and final: your game can <b>no longer be considered secure</b> and part of the Java security model. This puts it in exactly the same boat as any other application on the user's system. This also means you will not be able to use it in applets or with Webstart without getting your code signed and trusted. LWJGL itself will not be signed nor trusted; you are expected to deliver it bundled in with every application you ship and verify that your entire distribution is safe.</p> <p>We feel that our target developer, the commercial game developer, should not be concerned with this issue as the status quo is merely maintained from the old ways of programming with any other language; and used wisely, your exposure to pointers is unlikely to cause you any problems.</p> <p>If you are concerned about security, or wish to write games which will run as applets or from Webstart, or would rather have a full game library which takes care of things for you, you don't want to use LWJGL at all - it's that simple! What you need is Sun's Java Gaming Profile, or Java3D. If you feel a need to argue, you're using LWJGL for the wrong reasons.</p> <p>3.2 Graphics</p> <p>Graphics is based on the latest OpenGL1.4, and all the extensions we could implement that might be vaguely useful for games programmers. These include <i>all</i> of Nvidia's and ATI's proprietry extensions, and <i>all</i> the ARB extensions, and most of the EXT extensions, as well as numerous other miscellaneous ones.</p> <p>For Windows programmers, our primary target, the WGL extensions are present.</p> <p>All OpenGL functions that take pointers are passed ints. These pointers can be obtained from direct ByteBuffers using the Sys.getDirectBufferAddress() method. There are a very few native methods that return pointers as ints as well. Be sure to read the caveat about using pointers in Java!</p> <p>3.3 Sounds</p> <p>Sound is based on the latest OpenAL1.0 specification, which comes with but one extension, EAX, for interesting environmental effects. The LWJGL binary distribution includes the OpenAL .dlls for Win32.</p> <p>3.4 Input</p> <p>Input can be a complicated topic. A user can have all sorts of strange fancy force-feedback hardware installed on their systems, with scrolly knobs and twistgrips and bristling with many buttons. However, the vast majority of gamers have just a keyboard and a mouse; some of them have analogue joysticks too, and some of them have a gamepad attached from some console or other. For our first cut of the input library we've just kept it all rather simple, and decided that there is but one of each of these devices, and that force feedback and multiple potentiometers is a feature we may add another time.</p> <p>So in the interests of keeping things simple, the four input classes - Keyboard, Mouse, Gamepad and Joystick - are all static, and can all be polled once per game loop iteration to determine where they've moved since you last looked and what buttons are down at the time. The Gamepad and Keyboard may additionally support <i>buffering</i> which is a more reliable way of detecting rapid changes of state which may occur rather more quickly than your framerate.</p> <p>3.5 Maths</p> <p>Java's maths performance leaves much to be desired, particularly with respect to bulk operations for 3D rendering engines. The main problem is that the existing maths libraries use double precision when single precision is entirely adequate for most realtime games programming; and that no clever processor-specific optimisations can be done because the Hotspot compiler is simply not supplied enough semantic context to understand that it could use some special SIMD instruction to achieve the effect you desire in a fraction of the cycles. Furthermore, all maths in Java is done in Java - and once you've computed the results you usually have to subsequently copy them into a buffer to pass to a native rendering method in OpenGL anyway.</p> <p>The Math class provides two <i>totally generic</i> vector operators for unary and binary vector operations performed on direct ByteBuffers containing packed floating point vectors. The idea is to set up the source(s) of the operations and then perform a single call to JNI to perform a <i>highly optimised operation</i> on the whole lot in one go. The JNI code is specially optimised for the common cases in 3d games programming to use processor-specific instructions and take advantage, where feasible, of memory caching architecture. And the end result is placed directly back in memory, ready to simply send as a pointer direct to OpenGL or some other API.</p> <p>In addition we provide implementations of common Vector and Matrix sizes similar to those provided by the javax.vecmath package, but ours are <i>open source</i> and available without downloading the whole of Java3D.</p> <p> </p> </body> </html> |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 16:33:31
|
Update of /cvsroot/java-game-lib/LWJGL/doc/tutorial/_vti_cnf In directory usw-pr-cvs1:/tmp/cvs-serv28211/doc/tutorial/_vti_cnf Log Message: Directory /cvsroot/java-game-lib/LWJGL/doc/tutorial/_vti_cnf added to the repository |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 16:33:30
|
Update of /cvsroot/java-game-lib/LWJGL/doc/tutorial/_vti_pvt/_vti_cnf In directory usw-pr-cvs1:/tmp/cvs-serv28211/doc/tutorial/_vti_pvt/_vti_cnf Log Message: Directory /cvsroot/java-game-lib/LWJGL/doc/tutorial/_vti_pvt/_vti_cnf added to the repository |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 16:33:30
|
Update of /cvsroot/java-game-lib/LWJGL/doc/tutorial/images In directory usw-pr-cvs1:/tmp/cvs-serv28211/doc/tutorial/images Log Message: Directory /cvsroot/java-game-lib/LWJGL/doc/tutorial/images added to the repository |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 16:33:30
|
Update of /cvsroot/java-game-lib/LWJGL/doc/tutorial In directory usw-pr-cvs1:/tmp/cvs-serv28211/doc/tutorial Log Message: Directory /cvsroot/java-game-lib/LWJGL/doc/tutorial added to the repository |
|
From: Caspian Rychlik-P. <ci...@us...> - 2002-08-24 16:33:30
|
Update of /cvsroot/java-game-lib/LWJGL/doc/tutorial/_vti_pvt In directory usw-pr-cvs1:/tmp/cvs-serv28211/doc/tutorial/_vti_pvt Log Message: Directory /cvsroot/java-game-lib/LWJGL/doc/tutorial/_vti_pvt added to the repository |
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory usw-pr-cvs1:/tmp/cvs-serv30257/src/native/common Added Files: org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.h org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.h org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.h org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.h org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.h org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.h org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.h org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.h org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.h org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.h org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.h org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.h .cvsignore org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.h org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.h Removed Files: org_lwjgl_Math.h Log Message: New math code --- NEW FILE: org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe */ #ifndef _Included_org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe #define _Included_org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpAdd_00024MatrixOpSafe_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect */ #ifndef _Included_org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect #define _Included_org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNegate_00024MatrixOpDirect_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe */ #ifndef _Included_org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe #define _Included_org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpSafe_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe */ #ifndef _Included_org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe #define _Included_org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpMultiply_00024MatrixOpSafe_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect */ #ifndef _Included_org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect #define _Included_org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpSubtract_00024MatrixOpDirect_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect */ #ifndef _Included_org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect #define _Included_org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpMultiply_00024MatrixOpDirect_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect */ #ifndef _Included_org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect #define _Included_org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpDirect_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe */ #ifndef _Included_org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe #define _Included_org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNegate_00024MatrixOpSafe_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect */ #ifndef _Included_org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect #define _Included_org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpCopy_00024MatrixOpDirect_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe */ #ifndef _Included_org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe #define _Included_org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNormalise_00024MatrixOpSafe_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect */ #ifndef _Included_org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect #define _Included_org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNormalise_00024MatrixOpDirect_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe */ #ifndef _Included_org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe #define _Included_org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpSubtract_00024MatrixOpSafe_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: .cvsignore --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/.cvsignore Debug --- NEW FILE: org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe */ #ifndef _Included_org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe #define _Included_org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe * Method: execute * Signature: (IIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpCopy_00024MatrixOpSafe_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- NEW FILE: org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect */ #ifndef _Included_org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect #define _Included_org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect * Method: execute * Signature: (IIIIIZIIIIIZIIZ)V */ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpAdd_00024MatrixOpDirect_execute (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean, jint, jint, jint, jint, jint, jboolean, jint, jint, jboolean); #ifdef __cplusplus } #endif #endif --- org_lwjgl_Math.h DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Math.h |