aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-08-22 01:59:00 +0200
committerSven Gothel <[email protected]>2011-08-22 01:59:00 +0200
commit6c346d98f04e2355210960fe9ffde47432f04d62 (patch)
tree938536365abee309d5acf9ada1ac75bc1a49e939 /src/newt/classes/com
parent47b0d317df3c860b6cf3ea10196dfee82b3b3dc1 (diff)
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
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/ScreenMode.java4
-rw-r--r--src/newt/classes/com/jogamp/newt/util/MonitorMode.java8
-rw-r--r--src/newt/classes/com/jogamp/newt/util/ScreenModeUtil.java20
3 files changed, 16 insertions, 16 deletions
diff --git a/src/newt/classes/com/jogamp/newt/ScreenMode.java b/src/newt/classes/com/jogamp/newt/ScreenMode.java
index 2a05d842e..414e2fb9c 100644
--- a/src/newt/classes/com/jogamp/newt/ScreenMode.java
+++ b/src/newt/classes/com/jogamp/newt/ScreenMode.java
@@ -28,7 +28,7 @@
package com.jogamp.newt;
-import javax.media.nativewindow.util.DimensionReadOnly;
+import javax.media.nativewindow.util.DimensionImmutable;
import com.jogamp.newt.util.MonitorMode;
@@ -206,7 +206,7 @@ public class ScreenMode implements Cloneable {
}
private final int getRotatedWH(boolean width) {
- final DimensionReadOnly d = getMonitorMode().getSurfaceSize().getResolution();
+ final DimensionImmutable d = getMonitorMode().getSurfaceSize().getResolution();
final boolean swap = ScreenMode.ROTATE_90 == rotation || ScreenMode.ROTATE_270 == rotation ;
if ( ( width && swap ) || ( !width && !swap ) ) {
return d.getHeight();
diff --git a/src/newt/classes/com/jogamp/newt/util/MonitorMode.java b/src/newt/classes/com/jogamp/newt/util/MonitorMode.java
index fb2d0ceb5..69dc584d3 100644
--- a/src/newt/classes/com/jogamp/newt/util/MonitorMode.java
+++ b/src/newt/classes/com/jogamp/newt/util/MonitorMode.java
@@ -33,16 +33,16 @@ import javax.media.nativewindow.util.*;
/** Immutable MonitorMode Class, consisting of it's read only components:<br>
* <ul>
* <li>{@link javax.media.nativewindow.util.SurfaceSize} surface memory size</li>
- * <li>{@link javax.media.nativewindow.util.DimensionReadOnly} size in [mm]</li>
+ * <li>{@link javax.media.nativewindow.util.DimensionImmutable} size in [mm]</li>
* <li><code>refresh rate</code></li>
* </ul>
*/
public class MonitorMode implements Cloneable {
SurfaceSize surfaceSize;
- DimensionReadOnly screenSizeMM; // in [mm]
+ DimensionImmutable screenSizeMM; // in [mm]
int refreshRate;
- public MonitorMode(SurfaceSize surfaceSize, DimensionReadOnly screenSizeMM, int refreshRate) {
+ public MonitorMode(SurfaceSize surfaceSize, DimensionImmutable screenSizeMM, int refreshRate) {
if(null==surfaceSize || refreshRate<=0) {
throw new IllegalArgumentException("surfaceSize must be set and refreshRate greater 0");
}
@@ -63,7 +63,7 @@ public class MonitorMode implements Cloneable {
return surfaceSize;
}
- public final DimensionReadOnly getScreenSizeMM() {
+ public final DimensionImmutable getScreenSizeMM() {
return screenSizeMM;
}
diff --git a/src/newt/classes/com/jogamp/newt/util/ScreenModeUtil.java b/src/newt/classes/com/jogamp/newt/util/ScreenModeUtil.java
index 9c4993f1d..6986e3657 100644
--- a/src/newt/classes/com/jogamp/newt/util/ScreenModeUtil.java
+++ b/src/newt/classes/com/jogamp/newt/util/ScreenModeUtil.java
@@ -33,7 +33,7 @@ import com.jogamp.newt.ScreenMode;
import java.util.ArrayList;
import java.util.List;
import javax.media.nativewindow.util.Dimension;
-import javax.media.nativewindow.util.DimensionReadOnly;
+import javax.media.nativewindow.util.DimensionImmutable;
import javax.media.nativewindow.util.SurfaceSize;
/**
@@ -84,7 +84,7 @@ public class ScreenModeUtil {
* @param resolution
* @return modes with nearest resolution, or matching ones
*/
- public static List/*<ScreenMode>*/ filterByResolution(List/*<ScreenMode>*/ screenModes, DimensionReadOnly resolution) {
+ public static List/*<ScreenMode>*/ filterByResolution(List/*<ScreenMode>*/ screenModes, DimensionImmutable resolution) {
if(null==screenModes || screenModes.size()==0) {
return null;
}
@@ -94,7 +94,7 @@ public class ScreenModeUtil {
for (int i=0; null!=screenModes && i<screenModes.size(); i++) {
ScreenMode sm = (ScreenMode)screenModes.get(i);
- DimensionReadOnly res = sm.getMonitorMode().getSurfaceSize().getResolution();
+ DimensionImmutable res = sm.getMonitorMode().getSurfaceSize().getResolution();
int dsq = Math.abs(resolution_sq - res.getHeight()*res.getWidth());
if(dsq<sm_dsq) {
sm_dsq = dsq;
@@ -216,19 +216,19 @@ public class ScreenModeUtil {
}
/** WARNING: must be synchronized with ScreenMode.h, native implementation */
- public static DimensionReadOnly streamInResolution(int[] resolutionProperties, int offset) {
+ public static DimensionImmutable streamInResolution(int[] resolutionProperties, int offset) {
Dimension resolution = new Dimension(resolutionProperties[offset++], resolutionProperties[offset++]);
return resolution;
}
/** WARNING: must be synchronized with ScreenMode.h, native implementation */
- public static SurfaceSize streamInSurfaceSize(DimensionReadOnly resolution, int[] sizeProperties, int offset) {
+ public static SurfaceSize streamInSurfaceSize(DimensionImmutable resolution, int[] sizeProperties, int offset) {
SurfaceSize surfaceSize = new SurfaceSize(resolution, sizeProperties[offset++]);
return surfaceSize;
}
/** WARNING: must be synchronized with ScreenMode.h, native implementation */
- public static MonitorMode streamInMonitorMode(SurfaceSize surfaceSize, DimensionReadOnly screenSizeMM, int[] monitorProperties, int offset) {
+ public static MonitorMode streamInMonitorMode(SurfaceSize surfaceSize, DimensionImmutable screenSizeMM, int[] monitorProperties, int offset) {
int refreshRate = monitorProperties[offset++];
return new MonitorMode(surfaceSize, screenSizeMM, refreshRate);
}
@@ -288,10 +288,10 @@ public class ScreenModeUtil {
throw new RuntimeException("properties array too short, should be >= "+NUM_SCREEN_MODE_PROPERTIES_ALL+", is "+(modeProperties.length-offset));
}
offset++;
- DimensionReadOnly resolution = ScreenModeUtil.streamInResolution(modeProperties, offset);
+ DimensionImmutable resolution = ScreenModeUtil.streamInResolution(modeProperties, offset);
offset += ScreenModeUtil.NUM_RESOLUTION_PROPERTIES;
if(null!=resolutionPool) {
- resolution = (DimensionReadOnly) resolutionPool.getOrAdd(resolution);
+ resolution = (DimensionImmutable) resolutionPool.getOrAdd(resolution);
}
SurfaceSize surfaceSize = ScreenModeUtil.streamInSurfaceSize(resolution, modeProperties, offset);
@@ -300,10 +300,10 @@ public class ScreenModeUtil {
surfaceSize = (SurfaceSize) surfaceSizePool.getOrAdd(surfaceSize);
}
- DimensionReadOnly screenSizeMM = ScreenModeUtil.streamInResolution(modeProperties, offset);
+ DimensionImmutable screenSizeMM = ScreenModeUtil.streamInResolution(modeProperties, offset);
offset += ScreenModeUtil.NUM_RESOLUTION_PROPERTIES;
if(null!=screenSizeMMPool) {
- screenSizeMM = (DimensionReadOnly) screenSizeMMPool.getOrAdd(screenSizeMM);
+ screenSizeMM = (DimensionImmutable) screenSizeMMPool.getOrAdd(screenSizeMM);
}
MonitorMode monitorMode = ScreenModeUtil.streamInMonitorMode(surfaceSize, screenSizeMM, modeProperties, offset);