From 6c346d98f04e2355210960fe9ffde47432f04d62 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 22 Aug 2011 01:59:00 +0200 Subject: Misc Rename/Reloc; GLArrayData*/PMVMatrix enhancments; Test fixes/adds (GearsES1/ES2) rename/reloc: - javax.media.nativewindow.util: DimensionReadOnly -> DimensionImmutable PointReadOnly -> PointImmutable RectangleReadOnly -> RectangleImmutable unified 'immutable' name as used within jogamp already - remove array handler from public API com.jogamp.opengl.util.GL*ArrayHandler -> jogamp.opengl.util.GL*ArrayHandler - GLArrayData: Clarify method names getComponentNumber() -> getComponentCount() getComponentSize() -> getComponentSizeInBytes() getElementNumber() -> getElementCount() getByteSize() -> getSizeInBytes() - FixedFuncPipeline: Moved def. array names to GLPointerFuncUtil enhancement: - GLArrayDataServer: Add support for interleaved arrays/VBO - GLArrayData*.createFixed(..) remove 'name' argument (non sense for fixed function) - PMVMatrix: - one nio buffer - removed 'Pmv' multiplied matrix - removed 2x2 cut down 'Mvi' normal matrix (use 4x4 Mvi) - tests: - RedSquare -> RedSquareES1/RedSquareES2 - Gears ES1 fixed + ES2 added. Both work properly and share common Gears VBO construction - Added TestMapBuffer01NEWT, testing glMapBuffer --- .../javax/media/nativewindow/util/Dimension.java | 2 +- .../nativewindow/util/DimensionImmutable.java | 55 ++++++++++++++++++++++ .../media/nativewindow/util/DimensionReadOnly.java | 55 ---------------------- .../javax/media/nativewindow/util/Point.java | 2 +- .../media/nativewindow/util/PointImmutable.java | 50 ++++++++++++++++++++ .../media/nativewindow/util/PointReadOnly.java | 50 -------------------- .../javax/media/nativewindow/util/Rectangle.java | 2 +- .../nativewindow/util/RectangleImmutable.java | 54 +++++++++++++++++++++ .../media/nativewindow/util/RectangleReadOnly.java | 54 --------------------- .../javax/media/nativewindow/util/SurfaceSize.java | 8 ++-- 10 files changed, 166 insertions(+), 166 deletions(-) create mode 100644 src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java delete mode 100644 src/nativewindow/classes/javax/media/nativewindow/util/DimensionReadOnly.java create mode 100644 src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java delete mode 100644 src/nativewindow/classes/javax/media/nativewindow/util/PointReadOnly.java create mode 100644 src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java delete mode 100644 src/nativewindow/classes/javax/media/nativewindow/util/RectangleReadOnly.java (limited to 'src/nativewindow') diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java index 4151c1537..ebf5b9e81 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java @@ -29,7 +29,7 @@ package javax.media.nativewindow.util; -public class Dimension implements Cloneable, DimensionReadOnly { +public class Dimension implements Cloneable, DimensionImmutable { int width; int height; diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java new file mode 100644 index 000000000..262086ba3 --- /dev/null +++ b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java @@ -0,0 +1,55 @@ +/** + * Copyright 2010 JogAmp Community. All rights reserved. + * Copyright (c) 2010 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``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 JogAmp Community 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ + +package javax.media.nativewindow.util; + +/** Immutable Dimension Interface, consisting of it's read only components:
+ * + */ +public interface DimensionImmutable extends Cloneable { + + int getHeight(); + + int getWidth(); + + /** + * Checks whether two dimensions objects are equal. Two instances + * of DimensionReadOnly are equal if two components + * height and width are equal. + * @return true if the two dimensions are equal; + * otherwise false. + */ + boolean equals(Object obj); + + int hashCode(); + +} diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionReadOnly.java b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionReadOnly.java deleted file mode 100644 index 442afd4ba..000000000 --- a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionReadOnly.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright 2010 JogAmp Community. All rights reserved. - * Copyright (c) 2010 JogAmp Community. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``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 JogAmp Community 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. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of JogAmp Community. - */ - -package javax.media.nativewindow.util; - -/** Immutable Dimension Interface, consisting of it's read only components:
- * - */ -public interface DimensionReadOnly extends Cloneable { - - int getHeight(); - - int getWidth(); - - /** - * Checks whether two dimensions objects are equal. Two instances - * of DimensionReadOnly are equal if two components - * height and width are equal. - * @return true if the two dimensions are equal; - * otherwise false. - */ - boolean equals(Object obj); - - int hashCode(); - -} diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Point.java b/src/nativewindow/classes/javax/media/nativewindow/util/Point.java index 6db0ecfe2..89a87541e 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Point.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Point.java @@ -29,7 +29,7 @@ package javax.media.nativewindow.util; -public class Point implements Cloneable, PointReadOnly { +public class Point implements Cloneable, PointImmutable { int x; int y; diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java new file mode 100644 index 000000000..7f42138eb --- /dev/null +++ b/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java @@ -0,0 +1,50 @@ +/** + * Copyright 2010 JogAmp Community. All rights reserved. + * Copyright (c) 2010 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``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 JogAmp Community 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ + +package javax.media.nativewindow.util; + +/** Immutable Point interface */ +public interface PointImmutable extends Cloneable { + + int getX(); + + int getY(); + + /** + * Checks whether two points objects are equal. Two instances + * of PointReadOnly are equal if the two components + * y and x are equal. + * @return true if the two points are equal; + * otherwise false. + */ + public boolean equals(Object obj); + + public int hashCode(); + +} diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/PointReadOnly.java b/src/nativewindow/classes/javax/media/nativewindow/util/PointReadOnly.java deleted file mode 100644 index 9caaf7fee..000000000 --- a/src/nativewindow/classes/javax/media/nativewindow/util/PointReadOnly.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright 2010 JogAmp Community. All rights reserved. - * Copyright (c) 2010 JogAmp Community. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``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 JogAmp Community 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. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of JogAmp Community. - */ - -package javax.media.nativewindow.util; - -/** Immutable Point interface */ -public interface PointReadOnly extends Cloneable { - - int getX(); - - int getY(); - - /** - * Checks whether two points objects are equal. Two instances - * of PointReadOnly are equal if the two components - * y and x are equal. - * @return true if the two points are equal; - * otherwise false. - */ - public boolean equals(Object obj); - - public int hashCode(); - -} diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java b/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java index ba24bc64e..67bdcbfc7 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java @@ -28,7 +28,7 @@ package javax.media.nativewindow.util; -public class Rectangle implements Cloneable, RectangleReadOnly { +public class Rectangle implements Cloneable, RectangleImmutable { int x; int y; int width; diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java new file mode 100644 index 000000000..ede8ba9c5 --- /dev/null +++ b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java @@ -0,0 +1,54 @@ +/** + * Copyright 2010 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``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 JogAmp Community 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ + +package javax.media.nativewindow.util; + +/** Immutable Rectangle interface */ +public interface RectangleImmutable extends Cloneable { + + int getHeight(); + + int getWidth(); + + int getX(); + + int getY(); + + /** + * Checks whether two rect objects are equal. Two instances + * of Rectangle are equal if the four integer values + * of the fields y, x, + * height, and width are all equal. + * @return true if the two rectangles are equal; + * otherwise false. + */ + boolean equals(Object obj); + + int hashCode(); + +} diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleReadOnly.java b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleReadOnly.java deleted file mode 100644 index 81a5a9f86..000000000 --- a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleReadOnly.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright 2010 JogAmp Community. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``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 JogAmp Community 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. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of JogAmp Community. - */ - -package javax.media.nativewindow.util; - -/** Immutable Rectangle interface */ -public interface RectangleReadOnly extends Cloneable { - - int getHeight(); - - int getWidth(); - - int getX(); - - int getY(); - - /** - * Checks whether two rect objects are equal. Two instances - * of Rectangle are equal if the four integer values - * of the fields y, x, - * height, and width are all equal. - * @return true if the two rectangles are equal; - * otherwise false. - */ - boolean equals(Object obj); - - int hashCode(); - -} diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java index ea098b967..19786af2a 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java @@ -31,15 +31,15 @@ package javax.media.nativewindow.util; /** Immutable SurfaceSize Class, consisting of it's read only components:
* */ public class SurfaceSize implements Cloneable { - DimensionReadOnly resolution; + DimensionImmutable resolution; int bitsPerPixel; - public SurfaceSize(DimensionReadOnly resolution, int bitsPerPixel) { + public SurfaceSize(DimensionImmutable resolution, int bitsPerPixel) { if(null==resolution || bitsPerPixel<=0) { throw new IllegalArgumentException("resolution must be set and bitsPerPixel greater 0"); } @@ -55,7 +55,7 @@ public class SurfaceSize implements Cloneable { } } - public final DimensionReadOnly getResolution() { + public final DimensionImmutable getResolution() { return resolution; } -- cgit v1.2.3