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
(9) |
3
|
4
(1) |
5
(12) |
6
(5) |
7
|
8
|
9
|
10
(2) |
11
|
12
|
13
|
14
|
15
(1) |
16
(6) |
17
(5) |
18
(8) |
19
|
20
(12) |
21
|
22
|
23
(1) |
24
(1) |
25
|
26
(19) |
27
(1) |
28
(13) |
29
(8) |
30
|
31
|
|
|
From: Brian M. <ma...@us...> - 2003-07-05 23:59:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv24943 Removed Files: MatrixOpCommon.cpp MatrixOpCommon.h Log Message: removing parts of Math --- MatrixOpCommon.cpp DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/MatrixOpCommon.cpp --- MatrixOpCommon.h DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/MatrixOpCommon.h |
From: Brian M. <ma...@us...> - 2003-07-05 23:58:37
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1:/tmp/cvs-serv24811/src/java/org/lwjgl Modified Files: Math.java Log Message: removing parts of Math removing examples removed small doc Index: Math.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Math.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Math.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Math.java 23 Mar 2003 01:13:43 -0000 1.12 +++ Math.java 5 Jul 2003 23:58:34 -0000 1.13 @@ -56,677 +56,6 @@ /** Floating point version of pi */ public static final float PI = (float) java.lang.Math.PI; - /* - * Unary matrix operations - */ - private static abstract class UnaryMatrixOperation { - private final int enum; - private final String name; - - UnaryMatrixOperation(int enum, String name) { - this.enum = enum; - this.name = name; - } - - public String toString() { - return name; - } - - abstract MatrixOpClassification classify(); - - } - - /** - * A matrix operation is unsafe if the source and destination overlap, - * and either the strides are not equal, or destination > source, which - * would give an undefined result - */ - private static final MatrixOpClassification MATRIXOP_UNSAFE = new MatrixOpClassification() { - protected MatrixOpClassification unsafe() { return this; } - protected MatrixOpClassification safe() { return this; } - protected MatrixOpClassification direct() { return this; } - boolean isSafe() { return false; } - - void execute( - int leftSourceAddress, - int leftSourceStride, - int leftElements, - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceAddress, - int rightSourceStride, - int rightElements, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - int destAddress, - int destStride, - boolean transposeDest) - { - throw new IllegalArgumentException("Unsafe matrix operation."); - } - - void execute( - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest) - { - throw new IllegalArgumentException("Unsafe matrix operation."); - } - }; - - /** Straight copy */ - private static final class MatrixOpCopy extends UnaryMatrixOperation { - - MatrixOpCopy() { - super(0, "copy"); - } - - MatrixOpClassification classify() { - return MATRIXOP_NONE; - } - - /** - * Unclassified (initial state) matrix operation. - */ - private final MatrixOpClassification MATRIXOP_NONE = new MatrixOpClassification() { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return false; } - }; - - /** - * A matrix operation is direct if the source and destination addresses - * are the same, and the strides are the same. - */ - private final class MatrixOpDirect extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return this; } - protected MatrixOpClassification direct() { return this; } - boolean isSafe() { return false; } - native void execute( - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpDirect MATRIXOP_DIRECT = new MatrixOpDirect(); - - /** - * A matrix operation is safe if the source and destination do not - * overlap in any way - */ - private final class MatrixOpSafe extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return true; } - native void execute( - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpSafe MATRIXOP_SAFE = new MatrixOpSafe(); - }; - public static final MatrixOpCopy MATRIXOP_COPY = new MatrixOpCopy(); - - /** Negate the vector */ - private static final class MatrixOpNegate extends UnaryMatrixOperation { - - MatrixOpNegate() { - super(1, "negate"); - } - - MatrixOpClassification classify() { - return MATRIXOP_NONE; - } - - /** - * Unclassified (initial state) matrix operation. - */ - private final MatrixOpClassification MATRIXOP_NONE = new MatrixOpClassification() { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return false; } - }; - - /** - * A matrix operation is direct if the source and destination addresses - * are the same, and the strides are the same. - */ - private final class MatrixOpDirect extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return this; } - protected MatrixOpClassification direct() { return this; } - boolean isSafe() { return false; } - native void execute( - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpDirect MATRIXOP_DIRECT = new MatrixOpDirect(); - - /** - * A matrix operation is safe if the source and destination do not - * overlap in any way - */ - private final class MatrixOpSafe extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return true; } - native void execute( - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpSafe MATRIXOP_SAFE = new MatrixOpSafe(); - }; - public static final MatrixOpNegate MATRIXOP_NEGATE = new MatrixOpNegate(); - - /** Normalise the vector (set to length 1) */ - private static final class MatrixOpNormalise extends UnaryMatrixOperation { - - MatrixOpNormalise() { - super(2, "normalise"); - } - - MatrixOpClassification classify() { - return MATRIXOP_NONE; - } - - /** - * Unclassified (initial state) matrix operation. - */ - private final MatrixOpClassification MATRIXOP_NONE = new MatrixOpClassification() { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return true; } - }; - - /** - * A matrix operation is direct if the source and destination addresses - * are the same, and the strides are the same. - */ - private final class MatrixOpDirect extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return this; } - protected MatrixOpClassification direct() { return this; } - boolean isSafe() { return false; } - native void execute( - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpDirect MATRIXOP_DIRECT = new MatrixOpDirect(); - - /** - * A matrix operation is safe if the source and destination do not - * overlap in any way - */ - private final class MatrixOpSafe extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return true; } - native void execute( - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpSafe MATRIXOP_SAFE = new MatrixOpSafe(); - }; - public static final MatrixOpNormalise MATRIXOP_NORMALISE = new MatrixOpNormalise(); - - /** Compute the inverse matrix */ - private static final class MatrixOpInvert extends UnaryMatrixOperation { - - MatrixOpInvert() { - super(3, "invert"); - } - - MatrixOpClassification classify() { - return MATRIXOP_NONE; - } - - /** - * Unclassified (initial state) matrix operation. - */ - private final MatrixOpClassification MATRIXOP_NONE = new MatrixOpClassification() { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return false; } - }; - - /** - * A matrix operation is direct if the source and destination addresses - * are the same, and the strides are the same. - */ - private final class MatrixOpDirect extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return this; } - protected MatrixOpClassification direct() { return this; } - boolean isSafe() { return false; } - native void execute( - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpDirect MATRIXOP_DIRECT = new MatrixOpDirect(); - - /** - * A matrix operation is safe if the source and destination do not - * overlap in any way - */ - private final class MatrixOpSafe extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return true; } - native void execute( - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpSafe MATRIXOP_SAFE = new MatrixOpSafe(); - }; - public static final MatrixOpInvert MATRIXOP_INVERT = new MatrixOpInvert(); - - /* - * Binary matrix operations - */ - private static abstract class BinaryMatrixOperation { - private final int enum; - private final String name; - - BinaryMatrixOperation(int enum, String name) { - this.enum = enum; - this.name = name; - } - - public String toString() { - return name; - } - - /** - * Check the compatibility of a binary matrix operation. - * @return the miniumum stride, in bytes - * @throws IllegalArgumentException if the source and destinations are not - * compatible - */ - abstract int checkCompatibility( - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - boolean transposeDest); - - - - abstract MatrixOpClassification classify(); - - } - - - /** Multiply left source by right source */ - private static final class MatrixOpMultiply extends BinaryMatrixOperation { - - MatrixOpMultiply() { - super(0, "multiply"); - } - - int checkCompatibility( - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - boolean transposeDest) - { - // Left matrix width must be the same as right matrix height. - int leftWidth = transposeLeftSource ? leftSourceHeight : leftSourceWidth; - int rightHeight = transposeRightSource ? rightSourceWidth : rightSourceHeight; - if (leftWidth != rightHeight) - throw new IllegalArgumentException("Left and right matrices are not compatible."); - int leftHeight = transposeLeftSource ? leftSourceWidth : leftSourceHeight; - int rightWidth = transposeRightSource ? rightSourceHeight : rightSourceWidth; - return (rightWidth * leftHeight) << 2; - } - MatrixOpClassification classify() { - return MATRIXOP_NONE; - } - - /** - * Unclassified (initial state) matrix operation. - */ - private final MatrixOpClassification MATRIXOP_NONE = new MatrixOpClassification() { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return false; } - }; - - /** - * A matrix operation is direct if the source and destination addresses - * are the same, and the strides are the same. - */ - private final class MatrixOpDirect extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return this; } - protected MatrixOpClassification direct() { return this; } - boolean isSafe() { return false; } - native void execute( - int leftSourceAddress, - int leftSourceStride, - int leftElements, - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceAddress, - int rightSourceStride, - int rightElements, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpDirect MATRIXOP_DIRECT = new MatrixOpDirect(); - - - /** - * A matrix operation is safe if the source and destination do not - * overlap in any way - */ - private final class MatrixOpSafe extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return true; } - native void execute( - int leftSourceAddress, - int leftSourceStride, - int leftElements, - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceAddress, - int rightSourceStride, - int rightElements, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpSafe MATRIXOP_SAFE = new MatrixOpSafe(); - }; - public static final MatrixOpMultiply MATRIXOP_MULTIPLY = new MatrixOpMultiply(); - - /** Add right source to left source */ - private static final class MatrixOpAdd extends BinaryMatrixOperation { - - MatrixOpAdd() { - super(1, "add"); - } - - int checkCompatibility( - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - boolean transposeDest) - { - if (transposeLeftSource == transposeRightSource) { - // Left and right must be the same size - if (leftSourceWidth != rightSourceWidth || leftSourceHeight != rightSourceHeight) - throw new IllegalArgumentException("Left and right matrices are not the same size."); - } else { - // Left and right must be the same size but one of them is transposed - if (leftSourceWidth != rightSourceHeight || leftSourceHeight != rightSourceWidth) - throw new IllegalArgumentException("Left and right matrices are not the same size."); - } - return (leftSourceWidth * leftSourceHeight) << 2; - } - - MatrixOpClassification classify() { - return MATRIXOP_NONE; - } - - /** - * Unclassified (initial state) matrix operation. - */ - private final MatrixOpClassification MATRIXOP_NONE = new MatrixOpClassification() { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return false; } - }; - - /** - * A matrix operation is direct if the source and destination addresses - * are the same, and the strides are the same. - */ - private final class MatrixOpDirect extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return this; } - protected MatrixOpClassification direct() { return this; } - boolean isSafe() { return false; } - native void execute( - int leftSourceAddress, - int leftSourceStride, - int leftElements, - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceAddress, - int rightSourceStride, - int rightElements, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpDirect MATRIXOP_DIRECT = new MatrixOpDirect(); - - - /** - * A matrix operation is safe if the source and destination do not - * overlap in any way - */ - private final class MatrixOpSafe extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return true; } - native void execute( - int leftSourceAddress, - int leftSourceStride, - int leftElements, - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceAddress, - int rightSourceStride, - int rightElements, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpSafe MATRIXOP_SAFE = new MatrixOpSafe(); - }; - public static final MatrixOpAdd MATRIXOP_ADD = new MatrixOpAdd(); - - /** Subtract right source from left source */ - private static final class MatrixOpSubtract extends BinaryMatrixOperation { - - MatrixOpSubtract() { - super(2, "subtract"); - } - - int checkCompatibility( - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - boolean transposeDest) - { - // Same as for add, obviously... - return MATRIXOP_ADD.checkCompatibility( - leftSourceWidth, - leftSourceHeight, - transposeLeftSource, - rightSourceWidth, - rightSourceHeight, - transposeRightSource, - transposeDest - ); - } - MatrixOpClassification classify() { - return MATRIXOP_NONE; - } - - /** - * Unclassified (initial state) matrix operation. - */ - private final MatrixOpClassification MATRIXOP_NONE = new MatrixOpClassification() { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return false; } - }; - - /** - * A matrix operation is direct if the source and destination addresses - * are the same, and the strides are the same. - */ - private final class MatrixOpDirect extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return this; } - protected MatrixOpClassification direct() { return this; } - boolean isSafe() { return false; } - native void execute( - int leftSourceAddress, - int leftSourceStride, - int leftElements, - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceAddress, - int rightSourceStride, - int rightElements, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpDirect MATRIXOP_DIRECT = new MatrixOpDirect(); - - - /** - * A matrix operation is safe if the source and destination do not - * overlap in any way - */ - private final class MatrixOpSafe extends MatrixOpClassification { - protected MatrixOpClassification unsafe() { return MATRIXOP_UNSAFE; } - protected MatrixOpClassification safe() { return MATRIXOP_SAFE; } - protected MatrixOpClassification direct() { return MATRIXOP_DIRECT; } - boolean isSafe() { return true; } - native void execute( - int leftSourceAddress, - int leftSourceStride, - int leftElements, - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceAddress, - int rightSourceStride, - int rightElements, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - int destAddress, - int destStride, - boolean transposeDest); - }; - private final MatrixOpSafe MATRIXOP_SAFE = new MatrixOpSafe(); - }; - public static final MatrixOpSubtract MATRIXOP_SUBTRACT = new MatrixOpSubtract(); - /** * No constructor for Math. */ @@ -825,311 +154,4 @@ public static float sqrt(float x) { return 1.0f / invsqrt(x); } - - /* - * Matrix operation classifications - */ - private static abstract class MatrixOpClassification { - - abstract MatrixOpClassification unsafe(); - abstract MatrixOpClassification safe(); - abstract MatrixOpClassification direct(); - /** - * Execute a unary matrix operation. - * The default implementation does nothing. - */ - void execute( - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest) { - } - - /** - * Execute a binary matrix operation. - * The default implementation does nothing. - */ - void execute( - int leftSourceAddress, - int leftSourceStride, - int leftElements, - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceAddress, - int rightSourceStride, - int rightElements, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - int destAddress, - int destStride, - boolean transposeDest) { - } - - /** - * Check a binary operation to make sure that when dealing with n x n - * result sets that when both n's are greater than 1 the operation must - * be safe; otherwise if is direct, then the side where n > 1 must be - * the destination. - */ - MatrixOpClassification checkBinaryOp( - int leftSourceElements, - int rightSourceElements, - int leftSourceAddress, - int rightSourceAddress, - int destinationAddress - ) { - - if (leftSourceElements > 1 && rightSourceElements > 1) { - if (isSafe()) - return this; - else - return MATRIXOP_UNSAFE; - } else if (leftSourceElements == 1 && rightSourceElements > 1) { - if (isSafe()) - return this; - else if (destinationAddress == rightSourceAddress) - return this; - else - return MATRIXOP_UNSAFE; - } else if (rightSourceElements == 1 && leftSourceElements > 1) { - if (isSafe()) - return this; - else if (destinationAddress == leftSourceAddress) - return this; - else - return MATRIXOP_UNSAFE; - } else if (leftSourceElements == 1 && rightSourceElements == 1) { - return this; // even though this seems silly it is needed - } - else { - return MATRIXOP_UNSAFE; - } - } - - /** - * @return true if this is a safe classification - */ - abstract boolean isSafe(); - - public final MatrixOpClassification check( - int sourceAddress, - int sourceStride, - int numElements, - int destAddress, - int destStride) - { - int sourceEnd = sourceAddress + sourceStride * numElements; - int destEnd = destAddress + destStride * numElements; - // Check to see if source is somewhere inside the destination - if ((sourceAddress >= destAddress && sourceAddress <= destEnd) - || (sourceEnd >= destAddress && sourceEnd <= destEnd)) { - - // Check out the strides first - if (destAddress > sourceAddress || sourceStride != destStride) - return unsafe(); - else if (destAddress < sourceAddress) - return safe(); - else - return direct(); - - } else { - - // Completely safe - return safe(); - - } - } - } - - - - /** - * Apply a unary matrix operation to an array of matrices. - * @param operation A unary vector operation which must be one of - * MATRIXOP_NOOP, - * MATRIXOP_NEGATE, - * MATRIXOP_NORMALIZE, etc. - * @param sourceAddress The address of the source matrices - * @param sourceStride The distance between source matrices, in bytes; if 0, - * it is assumed that the matrices are tightly packed. This is equivalent to - * sourceStride == sourceWidth * sourceHeight * 4 - * @param numElements The number of matrices - * @param sourceWidth The width of the source matrix. Must be > 0. - * @param sourceHeight The height of the source matrix. Must be > 0. - * @param transposeSource The source can be transposed automatically before - * the operation is performed on it - * @param destAddress The results are placed here. This may overlap the - * source and can even be the same, which performs the unary operation - * in-situ - * @param destStride The distance between destination matrices, in bytes, - * similar to sourceStride. Note that if the source and destination address - * overlap and the strides are different then the result is undefined. - * @param transposeDest The destination can be transposed before being - * written - */ - public static void matrixOp( - UnaryMatrixOperation operation, - int sourceAddress, - int sourceStride, - int numElements, - int sourceWidth, - int sourceHeight, - boolean transposeSource, - int destAddress, - int destStride, - boolean transposeDest) { - - // Check that certain parameters are legal in the first place - assert sourceAddress != 0 : "0 source address"; - assert sourceStride >= 0 : "Illegal source stride"; - assert numElements >= 0 : "Illegal number of elements"; - assert sourceWidth >= 1 : "Illegal source width"; - assert sourceHeight >= 1 : "Illegal source height"; - assert destAddress != 0 : "0 dest address"; - assert destStride >= 0 : "Illegal dest stride"; - - // Calculate actual strides - if (sourceStride == 0) - sourceStride = (sourceWidth * sourceHeight) << 2; - if (destStride == 0) - destStride = sourceStride; - - // Check unary matrix operation type - MatrixOpClassification op = operation.classify().check(sourceAddress, sourceStride, numElements, destAddress, destStride); - - op.execute( - sourceAddress, - sourceStride, - numElements, - sourceWidth, - sourceHeight, - transposeSource, - destAddress, - destStride, - transposeDest - ); - - - } - - /** - * Apply a binary matrix operation to two arrays of matrices. The results - * are computed by applying the first right element to each of the left - * elements in turn; then the second right element to each left element; - * and so on. - * @param operation A binary vector operation which must be one of - * MATRIXOP_MUTLIPLY, - * MATRIXOP_ADD, - * MATRIXOP_SUBTRACT, etc. - * @param leftSourceAddress The address of the source matrices - * @param leftSourceStride The distance between source matrices, in bytes; if 0, - * it is assumed that the matrices are tightly packed. This is equivalent to - * sourceStride == sourceWidth * sourceHeight * 4 - * @param leftElements The number of left-hand-side matrices - * @param leftSourceWidth The width of the left source matrix. Must be > 0. - * @param leftSourceHeight The height of the left source matrix. Must be > 0. - * @param transposeLeftSource The left source can be transposed automatically before - * the operation is performed on it - * @param rightSourceAddress The address of the right source matrices - * @param rightSourceStride The distance between right source matrices, in bytes; if 0, - * it is assumed that the matrices are tightly packed. This is equivalent to - * sourceStride == sourceWidth * sourceHeight * 4 - * @param rightElements The number of right-hand-side matrices - * @param rightSourceWidth The width of the right source matrix. Must be > 0. - * @param rightSourceHeight The height of the right source matrix. Must be > 0. - * @param transposeRightSource The right source can be transposed automatically before - * the operation is performed on it - * @param destAddress The results are placed here. This may overlap the - * sources and can even be the same, which performs the binary operation - * in-situ - * @param destStride The distance between destination matrices, in bytes, - * similar to sourceStride. Note that if the source and destination address - * overlap and the strides are different then the result is undefined. - * @param transposeDest The destination can be transposed before being - * written - * @throws IllegalArgumentException if the source matrices are incompatible - */ - public static void matrixOp( - BinaryMatrixOperation operation, - int leftSourceAddress, - int leftSourceStride, - int leftElements, - int leftSourceWidth, - int leftSourceHeight, - boolean transposeLeftSource, - int rightSourceAddress, - int rightSourceStride, - int rightElements, - int rightSourceWidth, - int rightSourceHeight, - boolean transposeRightSource, - int destAddress, - int destStride, - boolean transposeDest) { - - // Check that certain parameters are legal in the first place - assert leftSourceAddress != 0 : "0 left source address"; - assert leftSourceStride >= 0 : "Illegal left source stride"; - assert leftElements >= 0 : "Illegal number of left elements"; - assert leftSourceWidth >= 1 : "Illegal left source width"; - assert leftSourceHeight >= 1 : "Illegal left source height"; - assert rightSourceAddress != 0 : "0 right source address"; - assert rightSourceStride >= 0 : "Illegal right source stride"; - assert rightElements >= 0 : "Illegal number of right elements"; - assert rightSourceWidth >= 1 : "Illegal right source width"; - assert rightSourceHeight >= 1 : "Illegal right source height"; - assert destAddress != 0 : "0 dest address"; - assert destStride >= 0 : "Illegal dest stride"; - - // Calculate actual strides - if (leftSourceStride == 0) - leftSourceStride = (leftSourceWidth * leftSourceHeight) << 2; - if (rightSourceStride == 0) - rightSourceStride = (rightSourceWidth * rightSourceHeight) << 2; - - // Ensure the source and destination matrices are compatible - int minStride = operation.checkCompatibility( - leftSourceWidth, - leftSourceHeight, - transposeLeftSource, - rightSourceWidth, - rightSourceHeight, - transposeRightSource, - transposeDest); - - if (destStride == 0) - destStride = minStride; - - // Check unary matrix operation type - MatrixOpClassification op = operation.classify().check(leftSourceAddress, leftSourceStride, leftElements, destAddress, destStride); - op = op.check(rightSourceAddress, rightSourceStride, rightElements, destAddress, destStride); - op = op.checkBinaryOp(leftElements, rightElements, leftSourceAddress, rightSourceAddress, destAddress); - op.execute( - leftSourceAddress, - leftSourceStride, - leftElements, - leftSourceWidth, - leftSourceHeight, - transposeLeftSource, - rightSourceAddress, - rightSourceStride, - rightElements, - rightSourceWidth, - rightSourceHeight, - transposeRightSource, - destAddress, - destStride, - transposeDest - ); - - } - - } |
From: Brian M. <ma...@us...> - 2003-07-05 23:58:37
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/vector In directory sc8-pr-cvs1:/tmp/cvs-serv24811/src/java/org/lwjgl/test/vector Removed Files: MathTest.java Log Message: removing parts of Math removing examples removed small doc --- MathTest.java DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/vector/MathTest.java |
From: Brian M. <ma...@us...> - 2003-07-05 23:58:36
|
Update of /cvsroot/java-game-lib/LWJGL/doc/javadoc In directory sc8-pr-cvs1:/tmp/cvs-serv24811/doc/javadoc Removed Files: manifest.txt Log Message: removing parts of Math removing examples removed small doc --- manifest.txt DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/doc/javadoc/manifest.txt |
From: Brian M. <ma...@us...> - 2003-07-05 23:13:13
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal In directory sc8-pr-cvs1:/tmp/cvs-serv19218/org/lwjgl/test/openal Modified Files: ALTest.java Log Message: fix: using type specific buffers Index: ALTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ALTest.java 2 Jul 2003 22:35:26 -0000 1.7 +++ ALTest.java 5 Jul 2003 23:13:09 -0000 1.8 @@ -834,10 +834,10 @@ } protected void fA_GetBufferProperties() { - ByteBuffer freq = createByteBuffer(16); - ByteBuffer bits = ((ByteBuffer) freq.position(4)).slice().order(ByteOrder.nativeOrder()); - ByteBuffer chan = ((ByteBuffer) freq.position(8)).slice().order(ByteOrder.nativeOrder()); - ByteBuffer size = ((ByteBuffer) freq.position(12)).slice().order(ByteOrder.nativeOrder()); + IntBuffer freq = createByteBuffer(16).asIntBuffer(); + IntBuffer bits = ((IntBuffer) freq.position(4)).slice(); + IntBuffer chan = ((IntBuffer) freq.position(8)).slice(); + IntBuffer size = ((IntBuffer) freq.position(12)).slice(); boolean passNULL; System.out.print("\nGet Buffer Properties Test. "); @@ -849,7 +849,7 @@ passNULL = !(AL.alIsBuffer(0)); // the NULL buffer should cause alIsBuffer to be FALSE // FREQ BITS CH SIZE - if ((freq.getInt(0) == 44100) && (bits.getInt(0) == 16) && (chan.getInt(0) == 1) && (size.getInt(0) == 282626) && (passNULL == true)) { + if ((freq.get(0) == 44100) && (bits.get(0) == 16) && (chan.get(0) == 1) && (size.get(0) == 282626) && (passNULL == true)) { System.out.print("PASSED."); } else { System.out.print("FAILED."); @@ -1639,10 +1639,10 @@ AL.alSourcei(testSources.get(0), AL.AL_LOOPING, AL.AL_FALSE); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("Init error : ", error); - AL.alSourceQueueBuffers(testSources.get(0), 1, ((ByteBuffer)buffers.position(4*6)).slice().order(ByteOrder.nativeOrder())); + AL.alSourceQueueBuffers(testSources.get(0), 1, ((ByteBuffer)buffers.position(4*6)).slice().asIntBuffer()); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("alSourceQueueBuffers 1 (stereo) : ", error); - AL.alSourceQueueBuffers(testSources.get(0), 1, ((ByteBuffer)buffers.position(4*6)).slice().order(ByteOrder.nativeOrder())); + AL.alSourceQueueBuffers(testSources.get(0), 1, ((ByteBuffer)buffers.position(4*6)).slice().asIntBuffer()); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("alSourceQueueBuffers 1 (stereo) : ", error); AL.alSourcePlay(testSources.get(0)); @@ -1685,7 +1685,7 @@ AL.alSourcei(testSources.get(0), AL.AL_LOOPING, AL.AL_FALSE); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("Init error : ", error); - AL.alSourceQueueBuffers(testSources.get(0), 1, ((ByteBuffer)buffers.position(4*6)).slice().order(ByteOrder.nativeOrder())); + AL.alSourceQueueBuffers(testSources.get(0), 1, ((ByteBuffer)buffers.position(4*6)).slice().asIntBuffer()); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("alSourceQueueBuffers 1 (stereo) : ", error); AL.alSourcePlay(testSources.get(0)); @@ -1699,14 +1699,14 @@ } else { AL.alSourceUnqueueBuffers(testSources.get(0), tempInt.get(0), bufferName); } - AL.alSourceQueueBuffers(testSources.get(0), 1, ((ByteBuffer)buffers.position(4*6)).slice().order(ByteOrder.nativeOrder())); + AL.alSourceQueueBuffers(testSources.get(0), 1, ((ByteBuffer)buffers.position(4*6)).slice().asIntBuffer()); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("alSourceQueueBuffers 1 (stereo) : ", error); AL.alSourcePlay(testSources.get(0)); delay_ms(3000); System.out.print("The stereo buffer will now play twice with no pause (Press Return):\n"); CRToContinue(); - AL.alSourceQueueBuffers(testSources.get(0), 1, ((ByteBuffer)buffers.position(4*6)).slice().order(ByteOrder.nativeOrder())); + AL.alSourceQueueBuffers(testSources.get(0), 1, ((ByteBuffer)buffers.position(4*6)).slice().asIntBuffer()); AL.alSourcePlay(testSources.get(0)); delay_ms(4000); CRForNextTest(); @@ -2352,28 +2352,28 @@ displayALError("alSourceQueueBuffers 4 : ", error); break; case '5': - AL.alSourceQueueBuffers(source.get(0), 1, ((ByteBuffer)buffers.position(4*0)).slice().order(ByteOrder.nativeOrder())); + AL.alSourceQueueBuffers(source.get(0), 1, ((ByteBuffer)buffers.position(4*0)).slice().asIntBuffer()); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("alSourceQueueBuffers 1 : ", error); break; case '6': - AL.alSourceQueueBuffers(source.get(0), 1, ((ByteBuffer)buffers.position(4*1)).slice().order(ByteOrder.nativeOrder())); + AL.alSourceQueueBuffers(source.get(0), 1, ((ByteBuffer)buffers.position(4*1)).slice().asIntBuffer()); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("alSourceQueueBuffers 1 : ", error); break; case '7': - AL.alSourceQueueBuffers(source.get(0), 1, ((ByteBuffer)buffers.position(4*2)).slice().order(ByteOrder.nativeOrder())); + AL.alSourceQueueBuffers(source.get(0), 1, ((ByteBuffer)buffers.position(4*2)).slice().asIntBuffer()); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("alSourceQueueBuffers 1 : ", error); break; case '8': - AL.alSourceQueueBuffers(source.get(0), 1, ((ByteBuffer)buffers.position(4*3)).slice().order(ByteOrder.nativeOrder())); + AL.alSourceQueueBuffers(source.get(0), 1, ((ByteBuffer)buffers.position(4*3)).slice().asIntBuffer()); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("alSourceQueueBuffers 1 : ", error); break; case '9': // Queue buffer 0 - AL.alSourceQueueBuffers(source.get(0), 1, ((ByteBuffer)buffers.position(4*4)).slice().order(ByteOrder.nativeOrder())); + AL.alSourceQueueBuffers(source.get(0), 1, ((ByteBuffer)buffers.position(4*4)).slice().asIntBuffer()); if ((error = AL.alGetError()) != AL.AL_NO_ERROR) displayALError("alSourceQueueBuffers 1 (buffer 0) : ", error); break; |
From: Brian M. <ma...@us...> - 2003-07-05 23:13:13
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1:/tmp/cvs-serv19218/org/lwjgl/openal Modified Files: CoreAL.java Log Message: fix: using type specific buffers Index: CoreAL.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/CoreAL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/CoreAL.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- CoreAL.java 2 Jul 2003 22:34:27 -0000 1.14 +++ CoreAL.java 5 Jul 2003 23:13:09 -0000 1.15 @@ -31,7 +31,11 @@ */ package org.lwjgl.openal; -import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.nio.FloatBuffer; +import java.nio.DoubleBuffer; + /** * $Id$ @@ -109,7 +113,7 @@ * @param pname state to be queried * @param data Buffer to place the booleans in */ - public static native void alGetBooleanv(int pname, Buffer data); + public static native void alGetBooleanv(int pname, ByteBuffer data); /** * Returns an integer OpenAL state. @@ -117,7 +121,7 @@ * @param pname state to be queried * @param data Buffer to place the integers in */ - public static native void alGetIntegerv(int pname, Buffer data); + public static native void alGetIntegerv(int pname, IntBuffer data); /** * Returns a floating point OpenAL state. @@ -125,7 +129,7 @@ * @param pname state to be queried * @param data Buffer to place the floats in */ - public static native void alGetFloatv(int pname, Buffer data); + public static native void alGetFloatv(int pname, FloatBuffer data); /** * Returns a double OpenAL state. @@ -133,7 +137,7 @@ * @param pname state to be queried * @param data Buffer to place the floats in */ - public static native void alGetDoublev(int pname, Buffer data); + public static native void alGetDoublev(int pname, DoubleBuffer data); /** * Retrieve an OpenAL string property. @@ -199,7 +203,7 @@ * @param pname name of the attribute to be set * @param floatdata Buffer to read floats from */ - public static native void alListenerfv(int pname, Buffer floatdata); + public static native void alListenerfv(int pname, FloatBuffer floatdata); /** * Gets an integer property of the listener. @@ -207,7 +211,7 @@ * @param pname name of the attribute to be retrieved * @param integerdata Buffer to write integer to */ - public static native void alGetListeneri(int pname, Buffer integerdata); + public static native void alGetListeneri(int pname, IntBuffer integerdata); /** * Gets a floating point property of the listener. @@ -215,7 +219,7 @@ * @param pname name of the attribute to be retrieved * @param floatdata Buffer to write float to */ - public static native void alGetListenerf(int pname, Buffer floatdata); + public static native void alGetListenerf(int pname, FloatBuffer floatdata); /** * Retrieves a floating point vector property of the listener. @@ -223,7 +227,7 @@ * @param pname name of the attribute to be retrieved * @param floatdata Buffer to write floats to */ - public static native void alGetListenerfv(int pname, Buffer floatdata); + public static native void alGetListenerfv(int pname, FloatBuffer floatdata); /** * Generate one or more sources. @@ -231,7 +235,7 @@ * @param n number of sources to generate * @param sources array holding sources */ - public static native void alGenSources(int n, Buffer sources); + public static native void alGenSources(int n, IntBuffer sources); /** * Delete one or more sources. @@ -239,7 +243,7 @@ * @param n Number of sources to delete * @param source Source array to delete from */ - public static native void alDeleteSources(int n, Buffer source); + public static native void alDeleteSources(int n, IntBuffer source); /** * Tests if a source is valid. @@ -291,7 +295,7 @@ * @param pname name of the attribute being set * @param floatdata Buffer to read floats from */ - public static native void alSourcefv(int source, int pname, Buffer floatdata); + public static native void alSourcefv(int source, int pname, FloatBuffer floatdata); /** * Retrieves an integer property of a source. @@ -300,7 +304,7 @@ * @param pname name of property * @param integerdata Buffer to write integer to */ - public static native void alGetSourcei(int source, int pname, Buffer integerdata); + public static native void alGetSourcei(int source, int pname, IntBuffer integerdata); /** * Retrieves a floating point property of a source. @@ -309,7 +313,7 @@ * @param pname name of property * @param floatdata Buffer to write float to */ - public static native void alGetSourcef(int source, int pname, Buffer floatdata); + public static native void alGetSourcef(int source, int pname, FloatBuffer floatdata); /** * Gets a floating point vector property from a Source object. @@ -318,7 +322,7 @@ * @param pname property to get * @param floatdata Buffer to write floats to */ - public static native void alGetSourcefv(int source, int pname, Buffer floatdata); + public static native void alGetSourcefv(int source, int pname, FloatBuffer floatdata); /** * Plays a set of sources. @@ -326,7 +330,7 @@ * @param n number of sources to play * @param sources array of sources to play */ - public static native void alSourcePlayv(int n, Buffer sources); + public static native void alSourcePlayv(int n, IntBuffer sources); /** * Pauses a set of sources. @@ -334,7 +338,7 @@ * @param n number of sources to pause * @param sources array of sources to pause */ - public static native void alSourcePausev(int n, Buffer sources); + public static native void alSourcePausev(int n, IntBuffer sources); /** * Stops a set of sources. @@ -342,7 +346,7 @@ * @param n number of sources to stop * @param sources array of sources to stop */ - public static native void alSourceStopv(int n, Buffer sources); + public static native void alSourceStopv(int n, IntBuffer sources); /** * Rewinds a set of sources. @@ -350,7 +354,7 @@ * @param n number of sources to rewind * @param sources array of sources to rewind */ - public static native void alSourceRewindv(int n, Buffer sources); + public static native void alSourceRewindv(int n, IntBuffer sources); /** * Play a source. @@ -386,7 +390,7 @@ * @param n number of buffers to generate * @param buffers holding buffers */ - public static native void alGenBuffers(int n, Buffer buffers); + public static native void alGenBuffers(int n, IntBuffer buffers); /** * Delete one or more buffers. @@ -394,7 +398,7 @@ * @param n Number of buffers to delete * @param buffers Buffer to delete from */ - public static native void alDeleteBuffers(int n, Buffer buffers); + public static native void alDeleteBuffers(int n, IntBuffer buffers); /** * Tests if buffer is valid. @@ -416,7 +420,7 @@ public static native void alBufferData( int buffer, int format, - Buffer data, + ByteBuffer data, int size, int freq); @@ -427,7 +431,7 @@ * @param pname name of property to retrieve * @param integerdata Buffer to write integer to */ - public static native void alGetBufferi(int buffer, int pname, Buffer integerdata); + public static native void alGetBufferi(int buffer, int pname, IntBuffer integerdata); /** * Retrieves a floating point property from a buffer. @@ -436,7 +440,7 @@ * @param pname name of property to retrieve * @param floatdata Buffer to write float to */ - public static native void alGetBufferf(int buffer, int pname, Buffer floatdata); + public static native void alGetBufferf(int buffer, int pname, FloatBuffer floatdata); /** * Queues a set of buffers on a source. @@ -445,7 +449,7 @@ * @param n number of buffers to be queued * @param buffers buffers to be queued */ - public static native void alSourceQueueBuffers(int source, int n, Buffer buffers); + public static native void alSourceQueueBuffers(int source, int n, IntBuffer buffers); /** * Unqueues a set of buffers attached to a source. @@ -454,7 +458,7 @@ * @param n number of buffers to be unqueued * @param buffers buffers to be unqueued */ - public static native void alSourceUnqueueBuffers(int source, int n, Buffer buffers); + public static native void alSourceUnqueueBuffers(int source, int n, IntBuffer buffers); /** * Selects the OpenAL distance model. |
From: Elias N. <eli...@us...> - 2003-07-05 22:19:56
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv12259/src/native Modified Files: configure.in Log Message: linux build fix Index: configure.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- configure.in 24 Jun 2003 12:24:55 -0000 1.14 +++ configure.in 5 Jul 2003 22:19:51 -0000 1.15 @@ -51,8 +51,8 @@ else AC_MSG_RESULT($JAVA_HOME) JAVA_HOME="$JAVA_HOME" - CPPFLAGS="$CPPFLAGS -fno-rtti -fno-exceptions -pthread -D_X11 -Wall -Wmissing-declarations -I$JAVA_HOME/include -I$JAVA_HOME/include/linux" - CFLAGS="$CFLAGS -pthread -D_X11 -Wall -Wmissing-declarations -I$JAVA_HOME/include -I$JAVA_HOME/include/linux" + CPPFLAGS="$CPPFLAGS -fno-rtti -fno-exceptions -pthread -D_X11 -Wall -I$JAVA_HOME/include -I$JAVA_HOME/include/linux" + CFLAGS="$CFLAGS -pthread -D_X11 -Wall -I$JAVA_HOME/include -I$JAVA_HOME/include/linux" fi dnl Checks for libraries. |
From: Elias N. <eli...@us...> - 2003-07-05 21:58:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv9693/common Modified Files: org_lwjgl_openal_eax_CoreEAX.cpp Log Message: fixed compiler warning Index: org_lwjgl_openal_eax_CoreEAX.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_eax_CoreEAX.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_eax_CoreEAX.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_openal_eax_CoreEAX.cpp 2 Jul 2003 22:42:41 -0000 1.5 +++ org_lwjgl_openal_eax_CoreEAX.cpp 5 Jul 2003 21:58:35 -0000 1.6 @@ -110,6 +110,7 @@ return result; #else ThrowException(env, "EAX extensions not supported"); + return 0; #endif } @@ -128,6 +129,7 @@ return result; #else ThrowException(env, "EAX extensions not supported"); + return 0; #endif } |
From: Elias N. <eli...@us...> - 2003-07-05 21:56:14
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv9473/common Modified Files: org_lwjgl_openal_ALC.cpp Log Message: fixed compiler warning Index: org_lwjgl_openal_ALC.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALC.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALC.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_openal_ALC.cpp 2 Jul 2003 22:42:41 -0000 1.8 +++ org_lwjgl_openal_ALC.cpp 5 Jul 2003 21:56:11 -0000 1.9 @@ -199,10 +199,11 @@ * ALCboolean alcMakeContextCurrent(ALCcontext *context); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALC_alcMakeContextCurrent (JNIEnv *env, jclass clazz, jint contextaddress) { - if(contextaddress == NULL) { + ALCcontext* context = (ALCcontext*) contextaddress; + if(context == NULL) { return alcMakeContextCurrent(NULL); } - return alcMakeContextCurrent((ALCcontext*) contextaddress); + return alcMakeContextCurrent(context); } /** |