From 243804a86df11f4c4f8207a35df79aba6fdc81c5 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Thu, 24 Mar 2011 12:22:42 +0000 Subject: [PATCH] Solved some inconsistency in the multitexturing API --- core/src/processing/core/PApplet.java | 18 ++++++------------ core/src/processing/core/PGraphics.java | 14 ++++---------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index f576cf2d8..6f27e110c 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -7860,9 +7860,9 @@ public class PApplet extends Applet * formatted vertex information. * @param v vertex parameters, as a float array of length VERTEX_FIELD_COUNT */ - public void vertex(float[] v) { - if (recorder != null) recorder.vertex(v); - g.vertex(v); + public void vertexFields(float[] v) { + if (recorder != null) recorder.vertexFields(v); + g.vertexFields(v); } @@ -10225,15 +10225,9 @@ public class PApplet extends Applet } - public void vertex(float x, float y, float... uv) { - if (recorder != null) recorder.vertex(x, y, uv); - g.vertex(x, y, uv); - } - - - public void vertex(float x, float y, float z, float... uv) { - if (recorder != null) recorder.vertex(x, y, z, uv); - g.vertex(x, y, z, uv); + public void vertex(float... values) { + if (recorder != null) recorder.vertex(values); + g.vertex(values); } diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 9fcebcb6e..0bc283b3b 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -1166,14 +1166,14 @@ public class PGraphics extends PImage implements PConstants { * formatted vertex information. * @param v vertex parameters, as a float array of length VERTEX_FIELD_COUNT */ - public void vertex(float[] v) { + public void vertexFields(float[] v) { vertexCheck(); curveVertexCount = 0; float[] vertex = vertices[vertexCount]; System.arraycopy(v, 0, vertex, 0, VERTEX_FIELD_COUNT); vertexCount++; } - + public void vertex(float x, float y, float u, float v) { vertexTexture(u, v); @@ -6007,13 +6007,7 @@ public class PGraphics extends PImage implements PConstants { showMissingWarning("texture"); } - - public void vertex(float x, float y, float... uv) { + public void vertex(float... values) { showMissingWarning("vertex"); - } - - - public void vertex(float x, float y, float z, float... uv) { - showMissingWarning("vertex"); - } + } }