rewrite createShape() handling to clean up the mess

This commit is contained in:
Ben Fry
2015-04-28 12:42:53 -04:00
parent 656acc58c0
commit 631cb4276d
12 changed files with 294 additions and 97 deletions

View File

@@ -2154,6 +2154,32 @@ public class PGraphicsOpenGL extends PGraphics {
}
//////////////////////////////////////////////////////////////
// CREATE SHAPE
@Override
protected PShape createShapeFamily(int type) {
PShape shape = new PShapeOpenGL(this, type);
if (is3D()) {
shape.set3D(true);
}
return shape;
}
@Override
protected PShape createShapePrimitive(int kind, float... p) {
PShape shape = new PShapeOpenGL(this, kind, p);
if (is3D()) {
shape.set3D(true);
}
return shape;
}
//////////////////////////////////////////////////////////////
// VERTEX SHAPES