aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java73
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/mipmap/HalveImage.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java46
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java3
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Maplist.java9
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java9
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java2
8 files changed, 76 insertions, 74 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
index 9962c0617..d4e5e7d62 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
@@ -333,7 +333,6 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
final int winattrmask = GLGraphicsConfigurationUtil.getExclusiveWinAttributeBits(capsChosen);
List<GLCapabilitiesImmutable> availableCaps = null;
int recommendedIndex = -1;
- long recommendedEGLConfig = -1;
final IntBuffer numConfigs = Buffers.newDirectIntBuffer(1);
if(!EGL.eglGetConfigs(eglDisplay, null, 0, numConfigs)) {
@@ -380,7 +379,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
if( hasEGLChosenCaps ) {
availableCaps = eglConfigs2GLCaps(device, glp, configs, numConfigs.get(0), winattrmask, forceTransparentFlag, skipCapsChooser /* onlyFirsValid */);
if(availableCaps.size() > 0) {
- recommendedEGLConfig = configs.get(0);
+ final long recommendedEGLConfig = configs.get(0);
recommendedIndex = 0;
if (DEBUG) {
System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 eglChooseConfig: recommended fbcfg " + toHexString(recommendedEGLConfig) + ", idx " + recommendedIndex);
@@ -399,7 +398,6 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
// 2nd choice: get all GLCapabilities available, no preferred recommendedIndex available
if( null == availableCaps || 0 == availableCaps.size() ) {
// reset ..
- recommendedEGLConfig = -1;
recommendedIndex = -1;
if(!EGL.eglGetConfigs(eglDisplay, configs, configs.capacity(), numConfigs)) {
diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java
index 338d7e6d6..a4507b767 100644
--- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java
+++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java
@@ -37,7 +37,6 @@ import jogamp.opengl.glu.nurbs.*;
import java.lang.reflect.Method;
-import javax.media.opengl.GL;
import javax.media.opengl.GL2;
import javax.media.opengl.glu.GLUnurbs;
@@ -71,13 +70,13 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
/**
* Using callback
+ * private final int callBackFlag;
*/
- private final int callBackFlag;
/**
* Object for error call backs
+ * private final Object errorCallback;
*/
- private final Object errorCallback;
/**
* List of map definitions
@@ -116,8 +115,8 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
/**
* Is curve modified
+ * private int isCurveModified;
*/
- private int isCurveModified;
/**
* Object holding rendering settings
@@ -126,8 +125,8 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
/**
* Display list
+ * private DisplayList dl;
*/
- private DisplayList dl;
/**
* Object for subdividing curves and surfaces
@@ -136,13 +135,13 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
/**
* Object responsible for rendering
+ * private Backend backend;
*/
- private Backend backend;
/**
* Next picewise linear curve in linked list
+ * private O_pwlcurve nextPwlcurve;
*/
- private O_pwlcurve nextPwlcurve;
/**
* Next trimming NURBS curve in linked list
@@ -156,13 +155,13 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
/**
* Are there any changes in trimming
+ * private boolean isTrimModified;
*/
- private boolean isTrimModified;
/**
* Are there any changes in surface data
+ * private boolean isDataSurfaceModified;
*/
- private boolean isDataSurfaceModified;
/**
* Nurber of trmims of processed surface
@@ -181,20 +180,20 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
/**
* Nextr surface in linked list
+ * private O_nurbssurface nextNurbssurface;
*/
- private O_nurbssurface nextNurbssurface;
/**
* Are there any changes in surface
+ * private boolean isSurfaceModified;
*/
- private boolean isSurfaceModified;
/**
* Initializes default GLUgl2nurbs object
*/
public GLUgl2nurbsImpl() {
// DONE
- maplist = new Maplist(backend);
+ maplist = new Maplist();
renderhints = new Renderhints();
subdivider = new Subdivider();
// original code
@@ -265,9 +264,9 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
this.autoloadmode = true;
- this.callBackFlag = 0;
+ // this.callBackFlag = 0;
- this.errorCallback = null;
+ // this.errorCallback = null;
}
/**
@@ -311,14 +310,14 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
*/
private void thread(final String name, final Object arg) {
// DONE
- final Class partype[] = new Class[1];
+ final Class<?> partype[] = new Class[1];
partype[0] = arg.getClass();
Method m;
try {
m = this.getClass().getMethod(name, partype);
- if (dl != null) {
+ /* if (dl != null) {
dl.append(this, m, arg);
- } else {
+ } else */ {
m.invoke(this, new Object[] { arg });
}
} catch (final Throwable e) {
@@ -337,9 +336,9 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
// DONE
try {
final Method m = this.getClass().getMethod(name, (Class[]) null);
- if (dl != null) {
+ /* if (dl != null) {
dl.append(this, m, null);
- } else {
+ } else */ {
m.invoke(this, (Object[]) null);
}
} catch (final Throwable e) {
@@ -365,7 +364,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
if (inTrim) {
if (!nextCurve.equals(o_curve)) {
- isCurveModified = 1;
+ // isCurveModified = 1;
nextCurve = o_curve;
}
} else {
@@ -375,7 +374,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
}
nextCurve = o_curve.next;
// kind of solution of union
- nextPwlcurve = o_curve.o_pwlcurve;
+ // nextPwlcurve = o_curve.o_pwlcurve;
nextNurbscurve = o_curve.o_nurbscurve;
}
@@ -395,13 +394,13 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
if (!playBack)
bgnrender();
- isTrimModified = false;
- isDataSurfaceModified = false;
+ // isTrimModified = false;
+ // isDataSurfaceModified = false;
isDataValid = 1;
numTrims = 0;
currentSurface = o_surface;
nextTrim = o_surface.o_trim;
- nextNurbssurface = o_surface.o_nurbssurface;
+ // nextNurbssurface = o_surface.o_nurbssurface;
}
/**
@@ -429,14 +428,14 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
inSurface = 0;
- nextNurbssurface = null;
+ // nextNurbssurface = null;
if (isDataValid <= 0) {
return;
}
if (nextTrim != null) {
- isTrimModified = true;
+ // isTrimModified = true;
nextTrim = null;
}
@@ -638,7 +637,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
// if(!o_nurbscurve.equals(nextNurbscurve)){
if (!o_nurbscurve.equals(currentCurve.o_nurbscurve)) {
- isCurveModified = 1;
+ // isCurveModified = 1;
currentCurve.o_nurbscurve = o_nurbscurve;
// nextNurbscurve=o_nurbscurve;
@@ -647,15 +646,19 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
nextNurbscurve = o_nurbscurve.next;
if (!currentCurve.equals(o_nurbscurve.owner)) {
- isCurveModified = 1;
+ // isCurveModified = 1;
o_nurbscurve.owner = currentCurve;
}
- if (o_nurbscurve.owner == null)
+
+ /**
+ if (o_nurbscurve.owner == null) {
isCurveModified = 1;
+ } */
- if (inCurve == 2)
+ if (inCurve == 2) {
endcurve();
+ }
}
/**
@@ -677,18 +680,18 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
} else
o_nurbssurface.used = true;
- if (!o_nurbssurface.equals(nextNurbscurve)) {
- isSurfaceModified = true;
+ // Always true, instances of diff classes are compared: if (!o_nurbssurface.equals(nextNurbscurve)) {
+ // isSurfaceModified = true;
// nextNurbssurface=o_nurbssurface;
currentSurface.o_nurbssurface = o_nurbssurface;
- }
+ // }
if (!currentSurface.equals(o_nurbssurface.owner)) {
- isSurfaceModified = true;
+ // isSurfaceModified = true;
o_nurbssurface.owner = currentSurface;
}
- nextNurbssurface = o_nurbssurface.next;
+ // nextNurbssurface = o_nurbssurface.next;
if (inSurface == 2)
endsurface();
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/HalveImage.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/HalveImage.java
index 100c6ba1f..95ce86a5b 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/HalveImage.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/HalveImage.java
@@ -1140,10 +1140,10 @@ public class HalveImage {
final int imageSizeInBytes, final boolean isSwap ) {
int ii, jj;
final int halfWidth = width / 2;
- final int halfHeight = height / 2;
+ // final int halfHeight = height / 2;
final int halfDepth = depth / 2;
int src = 0;
- final int padBytes = rowSizeInBytes - ( width * pixelSizeInBytes );
+ // final int padBytes = rowSizeInBytes - ( width * pixelSizeInBytes );
int outIndex = 0;
assert( (width == 1 || height == 1) && depth >= 2 );
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java
index 5fccbc598..ce0387bff 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java
@@ -182,27 +182,31 @@ public class Curve {
} else {
assert (order <= MAXORDER);
- final float tmp[][] = new float[MAXORDER][MAXCOORDS];
-
- final int tstride = (MAXORDER);
-
- final int val = 0;
- // mapdesc.project(spts,stride,tmp,tstride,order);
-
- // System.out.println("TODO curve.getsptepsize mapdesc.project");
-
- if (val == 0) {
- setstepsize(mapdesc.maxrate);
- } else {
- final float t = mapdesc.getProperty(NurbsConsts.N_PIXEL_TOLERANCE);
- if (mapdesc.isParametricDistanceSampling()) {
- // System.out.println("TODO curve.getstepsize - parametric");
- } else if (mapdesc.isPathLengthSampling()) {
- // System.out.println("TODO curve.getstepsize - pathlength");
- } else {
- setstepsize(mapdesc.maxrate);
- }
- }
+ setstepsize(mapdesc.maxrate);
+
+ /***
+ final float tmp[][] = new float[MAXORDER][MAXCOORDS];
+
+ final int tstride = (MAXORDER);
+
+ final int val = 0;
+ // mapdesc.project(spts,stride,tmp,tstride,order);
+
+ // System.out.println("TODO curve.getsptepsize mapdesc.project");
+
+ if (val == 0) {
+ setstepsize(mapdesc.maxrate);
+ } else {
+ final float t = mapdesc.getProperty(NurbsConsts.N_PIXEL_TOLERANCE);
+ if (mapdesc.isParametricDistanceSampling()) {
+ // System.out.println("TODO curve.getstepsize - parametric");
+ } else if (mapdesc.isPathLengthSampling()) {
+ // System.out.println("TODO curve.getstepsize - pathlength");
+ } else {
+ setstepsize(mapdesc.maxrate);
+ }
+ }
+ */
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java
index 95ce60c25..b6e83d94c 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java
@@ -166,9 +166,8 @@ public class Mapdesc {
* @param type map type
* @param rational is rational
* @param ncoords number of control points coords
- * @param backend backend object
*/
- public Mapdesc(final int type, final int rational, final int ncoords, final Backend backend) {
+ public Mapdesc(final int type, final int rational, final int ncoords) {
// DONE
this.type = type;
this.isrational = rational;
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Maplist.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Maplist.java
index 7f9d7c5a0..2cb92aeef 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Maplist.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Maplist.java
@@ -47,15 +47,14 @@ public class Maplist {
/**
* Backend class
+ * private final Backend backend;
*/
- private final Backend backend;
/**
* Makes new Maplist
- * @param backend Backend class
*/
- public Maplist(final Backend backend) {
- this.backend = backend;
+ public Maplist(/* final Backend backend */) {
+ // this.backend = backend;
}
/**
@@ -88,7 +87,7 @@ public class Maplist {
*/
private void add(final int type, final int rational, final int ncoords) {
// DONE
- final Mapdesc map = new Mapdesc(type, rational, ncoords, backend);
+ final Mapdesc map = new Mapdesc(type, rational, ncoords);
if (maps == null) {
maps = map;
} else {
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java
index d7c1dbf3c..573c7df11 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java
@@ -133,12 +133,12 @@ public class Subdivider {
/**
* Breakpoints
*/
- private Flist smbrkpts;
+ private final Flist smbrkpts = new Flist();
/**
* Not used
+ * private float[] stepsizes;
*/
- private float[] stepsizes;
/**
* Domain distance in V direction
@@ -651,8 +651,8 @@ public class Subdivider {
arctesselator.bezier(newright, s, s, t1, t2);
arctesselator.bezier(newleft, s, s, t2, t1);
} else {
- arctesselator.pwl_right(newright, s, t1, t2, stepsizes[0]);
- arctesselator.pwl_left(newright, s, t2, t1, stepsizes[2]);
+ arctesselator.pwl_right(newright, s, t1, t2, 0 /* stepsizes[0] */);
+ arctesselator.pwl_left(newright, s, t2, t1, 0 /* stepsizes[2] */);
}
link(jarc1, jarc2, newright, newleft);
left.addarc(newright);
@@ -732,7 +732,6 @@ public class Subdivider {
} else if (hdiff == 0) {
tailonright.addarc(jarc);
} else {
- final Arc jtemp;
switch (arc_split(jarc, param, value, 0)) {
case 2:
tailonright.addarc(jarc);
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java
index 517ca72cc..9e784ad73 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java
@@ -165,7 +165,7 @@ public class WindowsAWTWGLGraphicsConfigurationFactory extends GLGraphicsConfigu
System.err.println("WindowsAWTWGLGraphicsConfigurationFactory: PFD IDs: "+pfdIDs.length+", unique: "+pfdIDOSet.size());
}
winConfig.preselectGraphicsConfiguration(drawableFactory, pfdIDs);
- final int gcIdx = pfdIDOSet.indexOf(new Integer(winConfig.getPixelFormatID()));
+ final int gcIdx = pfdIDOSet.indexOf(Integer.valueOf(winConfig.getPixelFormatID()));
if( 0 > gcIdx ) {
chosenGC = configs[gcIdx];
if(DEBUG) {