mirror of
https://github.com/processing/processing4.git
synced 2026-02-08 08:09:32 +01:00
rewrite createShape() handling to clean up the mess
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user