summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java5
-rw-r--r--src/newt/classes/com/jogamp/newt/MonitorDevice.java15
-rw-r--r--src/newt/classes/com/jogamp/newt/Window.java1
3 files changed, 16 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
index 1014553d3..6f419704b 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
@@ -136,7 +136,7 @@ public class RegionRenderer {
* </p>
* @param rs the used {@link RenderState}
* @param enableCallback optional {@link GLCallback}, if not <code>null</code> will be issued at
- * {@link #init(GL2ES2, int) init(gl)} and {@link #enable(GL2ES2, boolean) enable(gl, true)}.
+ * {@link #init(GL2ES2) init(gl)} and {@link #enable(GL2ES2, boolean) enable(gl, true)}.
* @param disableCallback optional {@link GLCallback}, if not <code>null</code> will be issued at
* {@link #enable(GL2ES2, boolean) enable(gl, false)}.
* @return an instance of Region Renderer
@@ -194,10 +194,9 @@ public class RegionRenderer {
* <p>Shall be called by a {@code draw()} method, e.g. {@link RegionRenderer#draw(GL2ES2, Region, int)}</p>
*
* @param gl referencing the current GLContext to which the ShaderState is bound to
- * @param renderModes
* @throws GLException if initialization failed
*/
- public final void init(final GL2ES2 gl, final int renderModes) throws GLException {
+ public final void init(final GL2ES2 gl) throws GLException {
if(initialized){
return;
}
diff --git a/src/newt/classes/com/jogamp/newt/MonitorDevice.java b/src/newt/classes/com/jogamp/newt/MonitorDevice.java
index 9ad194ce8..f7d08686e 100644
--- a/src/newt/classes/com/jogamp/newt/MonitorDevice.java
+++ b/src/newt/classes/com/jogamp/newt/MonitorDevice.java
@@ -230,10 +230,12 @@ public abstract class MonitorDevice {
* Returns the <i>pixels per millimeter</i> value according to the <i>current</i> {@link MonitorMode mode}'s
* {@link SurfaceSize#getResolution() surface resolution}.
* <p>
- * To convert the result to <i>dpi</i>, i.e. dots-per-inch, multiply both components with <code>25.4f</code>.
+ * To convert the result to <i>dpi</i>, i.e. dots-per-inch, multiply both components with <code>25.4f</code>,
+ * see {@link #perMMToPerInch(float[])}.
* </p>
* @param ppmmStore float[2] storage for the ppmm result
* @return the passed storage containing the ppmm for chaining
+ * @see #perMMToPerInch(float[])
*/
public final float[] getPixelsPerMM(final float[] ppmmStore) {
return getPixelsPerMM(getCurrentMode(), ppmmStore);
@@ -258,6 +260,17 @@ public abstract class MonitorDevice {
}
/**
+ * Converts [1/mm] to [1/inch] in place
+ * @param ppmm float[2] [1/mm] value
+ * @return return [1/inch] value
+ */
+ public static float[/*2*/] perMMToPerInch(final float[/*2*/] ppmm) {
+ ppmm[0] *= 25.4f;
+ ppmm[1] *= 25.4f;
+ return ppmm;
+ }
+
+ /**
* Returns the immutable original {@link com.jogamp.newt.MonitorMode}, as used at NEWT initialization.
* <p>
* The returned {@link MonitorMode} is element of the lists {@link #getSupportedModes()} and {@link Screen#getMonitorModes()}.
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java
index 5134708c4..3a84bd79c 100644
--- a/src/newt/classes/com/jogamp/newt/Window.java
+++ b/src/newt/classes/com/jogamp/newt/Window.java
@@ -47,7 +47,6 @@ import com.jogamp.nativewindow.CapabilitiesImmutable;
import com.jogamp.nativewindow.NativeWindow;
import com.jogamp.nativewindow.ScalableSurface;
import com.jogamp.nativewindow.WindowClosingProtocol;
-import com.jogamp.nativewindow.util.Rectangle;
import com.jogamp.nativewindow.util.RectangleImmutable;
import com.jogamp.nativewindow.util.SurfaceSize;