@@ -600,22 +600,22 @@ protected void finalizePointBuffers() {
600600 // Shape creation (temporary hack)
601601
602602
603- public static PShapeOpenGL createShape3D (PGraphicsOpenGL pg , PShape src ) {
603+ public static PShapeOpenGL createShape (PGraphicsOpenGL pg , PShape src ) {
604604 PShapeOpenGL dest = null ;
605605 if (src .getFamily () == GROUP ) {
606606 //dest = PGraphics3D.createShapeImpl(pg, GROUP);
607- dest = (PShapeOpenGL ) (( PGraphics3D ) pg ) .createShapeFamily (GROUP );
608- copyGroup3D (pg , src , dest );
607+ dest = (PShapeOpenGL ) pg .createShapeFamily (GROUP );
608+ copyGroup (pg , src , dest );
609609 } else if (src .getFamily () == PRIMITIVE ) {
610610 //dest = PGraphics3D.createShapeImpl(pg, src.getKind(), src.getParams());
611- dest = (PShapeOpenGL ) (( PGraphics3D ) pg ) .createShapePrimitive (src .getKind (), src .getParams ());
611+ dest = (PShapeOpenGL ) pg .createShapePrimitive (src .getKind (), src .getParams ());
612612 PShape .copyPrimitive (src , dest );
613613 } else if (src .getFamily () == GEOMETRY ) {
614614 //dest = PGraphics3D.createShapeImpl(pg, PShape.GEOMETRY);
615- dest = (PShapeOpenGL ) (( PGraphics3D ) pg ) .createShapeFamily (PShape .GEOMETRY );
615+ dest = (PShapeOpenGL ) pg .createShapeFamily (PShape .GEOMETRY );
616616 PShape .copyGeometry (src , dest );
617617 } else if (src .getFamily () == PATH ) {
618- dest = (PShapeOpenGL ) (( PGraphics3D ) pg ) .createShapeFamily (PShape .PATH );
618+ dest = (PShapeOpenGL ) pg .createShapeFamily (PShape .PATH );
619619 //dest = PGraphics3D.createShapeImpl(pg, PATH);
620620 PShape .copyPath (src , dest );
621621 }
@@ -627,44 +627,46 @@ public static PShapeOpenGL createShape3D(PGraphicsOpenGL pg, PShape src) {
627627 }
628628
629629
630+ /*
630631 static public PShapeOpenGL createShape2D(PGraphicsOpenGL pg, PShape src) {
631632 PShapeOpenGL dest = null;
632633 if (src.getFamily() == GROUP) {
633634 //dest = PGraphics2D.createShapeImpl(pg, GROUP);
634- dest = (PShapeOpenGL ) (( PGraphics2D ) pg ) .createShapeFamily (GROUP );
635+ dest = (PShapeOpenGL) pg .createShapeFamily(GROUP);
635636 copyGroup2D(pg, src, dest);
636637 } else if (src.getFamily() == PRIMITIVE) {
637638 //dest = PGraphics2D.createShapeImpl(pg, src.getKind(), src.getParams());
638- dest = (PShapeOpenGL ) (( PGraphics2D ) pg ) .createShapePrimitive (src .getKind (), src .getParams ());
639+ dest = (PShapeOpenGL) pg .createShapePrimitive(src.getKind(), src.getParams());
639640 PShape.copyPrimitive(src, dest);
640641 } else if (src.getFamily() == GEOMETRY) {
641642 //dest = PGraphics2D.createShapeImpl(pg, PShape.GEOMETRY);
642- dest = (PShapeOpenGL ) (( PGraphics2D ) pg ) .createShapeFamily (PShape .GEOMETRY );
643+ dest = (PShapeOpenGL) pg .createShapeFamily(PShape.GEOMETRY);
643644 PShape.copyGeometry(src, dest);
644645 } else if (src.getFamily() == PATH) {
645646 //dest = PGraphics2D.createShapeImpl(pg, PATH);
646- dest = (PShapeOpenGL ) (( PGraphics2D ) pg ) .createShapeFamily (PShape .PATH );
647+ dest = (PShapeOpenGL) pg .createShapeFamily(PShape.PATH);
647648 PShape.copyPath(src, dest);
648649 }
649650 dest.setName(src.getName());
650651 dest.width = src.width;
651652 dest.height = src.height;
652653 return dest;
653654 }
655+ */
654656
655-
656- static public void copyGroup3D (PGraphicsOpenGL pg , PShape src , PShape dest ) {
657+ static public void copyGroup (PGraphicsOpenGL pg , PShape src , PShape dest ) {
657658 copyMatrix (src , dest );
658659 copyStyles (src , dest );
659660 copyImage (src , dest );
660661
661662 for (int i = 0 ; i < src .getChildCount (); i ++) {
662- PShape c = createShape3D (pg , src .getChild (i ));
663+ PShape c = createShape (pg , src .getChild (i ));
663664 dest .addChild (c );
664665 }
665666 }
666667
667668
669+ /*
668670 static public void copyGroup2D(PGraphicsOpenGL pg, PShape src, PShape dest) {
669671 copyMatrix(src, dest);
670672 copyStyles(src, dest);
@@ -675,7 +677,7 @@ static public void copyGroup2D(PGraphicsOpenGL pg, PShape src, PShape dest) {
675677 dest.addChild(c);
676678 }
677679 }
678-
680+ */
679681
680682 ///////////////////////////////////////////////////////////
681683
0 commit comments