Can use TRIANGLE and QUAD in createShape(type)

This commit is contained in:
codeanticode
2012-03-31 18:41:32 +00:00
parent 84f790266d
commit b3e1894109
2 changed files with 4 additions and 4 deletions

View File

@@ -1897,7 +1897,7 @@ public class PGraphicsOpenGL extends PGraphics {
} else if (type == LINES) {
shape = new PShape3D(parent, PShape.GEOMETRY);
shape.setKind(LINES);
} else if (type == TRIANGLES) {
} else if (type == TRIANGLE || type == TRIANGLES) {
shape = new PShape3D(parent, PShape.GEOMETRY);
shape.setKind(TRIANGLES);
} else if (type == TRIANGLE_FAN) {
@@ -1906,7 +1906,7 @@ public class PGraphicsOpenGL extends PGraphics {
} else if (type == TRIANGLE_STRIP) {
shape = new PShape3D(parent, PShape.GEOMETRY);
shape.setKind(TRIANGLE_STRIP);
} else if (type == QUADS) {
} else if (type == QUADS || type == QUADS) {
shape = new PShape3D(parent, PShape.GEOMETRY);
shape.setKind(QUADS);
} else if (type == QUAD_STRIP) {