aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/geom/SVertex.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-04-02 19:25:16 +0200
committerSven Gothel <[email protected]>2014-04-02 19:25:16 +0200
commitabc833631e0ab30a06c7aff47a39a551544fd735 (patch)
tree1d6e5a94d2149d7b2635de5b5eccb330bc41cd2c /src/jogl/classes/com/jogamp/graph/geom/SVertex.java
parente8a5a1cbb988670ca206ab1ac633e19a91bfa478 (diff)
Bug 801: Reduce temp. object creation, i.e. GC load
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/geom/SVertex.java')
-rw-r--r--src/jogl/classes/com/jogamp/graph/geom/SVertex.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/geom/SVertex.java b/src/jogl/classes/com/jogamp/graph/geom/SVertex.java
index d13607d71..579f92455 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/SVertex.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/SVertex.java
@@ -75,10 +75,10 @@ public class SVertex implements Vertex {
}
public SVertex(final Vertex src) {
- this.id = src.getId();
+ this.id = Integer.MAX_VALUE;
System.arraycopy(src.getCoord(), 0, coord, 0, 3);
- setOnCurve(src.isOnCurve());
System.arraycopy(src.getTexCoord(), 0, texCoord, 0, 3);
+ setOnCurve(src.isOnCurve());
}
public SVertex(final int id, final boolean onCurve, final float[] texCoordsBuffer) {
@@ -99,13 +99,6 @@ public class SVertex implements Vertex {
setOnCurve(onCurve);
}
- public SVertex(float[] coordsBuffer, float[] texCoordsBuffer, boolean onCurve) {
- this.id = Integer.MAX_VALUE;
- System.arraycopy(coordsBuffer, 0, coord, 0, 3);
- System.arraycopy(texCoordsBuffer, 0, texCoord, 0, 3);
- setOnCurve(onCurve);
- }
-
@Override
public final void setCoord(float x, float y, float z) {
coord[0] = x;
@@ -215,7 +208,7 @@ public class SVertex implements Vertex {
*/
@Override
public SVertex clone(){
- return new SVertex(this.coord, this.texCoord, this.onCurve);
+ return new SVertex(this);
}
@Override