Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8118973

Cannot slide slider when 3D rotating 2D content with depth buffer enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8
    • javafx
    • None

      At first I thought I was being bit by RT-17024, but actually this appears to be something different. The odd thing is that it is triggered by a change in whether the scene is using a depth buffer. My first guess is that it is a problem in picking.


      public class HelloRectangle3D extends Application {
          @Override public void start(Stage stage) throws Exception {
              Rectangle background = new Rectangle(300, 300, Color.PURPLE);
              background.setRotationAxis(Rotate.Y_AXIS);
              background.setRotate(45);

              Rectangle rect = new Rectangle(200, 200);
              rect.setFill(new LinearGradient(0, 0, 0, 1, true, CycleMethod.NO_CYCLE, new Stop(0, Color.ORANGE), new Stop(1, Color.ORANGE.darker().darker())));
              rect.setArcHeight(42);
              rect.setArcWidth(42);
              rect.setStroke(Color.WHITE);
              rect.setStrokeWidth(5);
              rect.setRotationAxis(Rotate.Y_AXIS);

              Slider slider = new Slider(0, 360, 0);
              rect.rotateProperty().bind(slider.valueProperty());

              StackPane stack = new StackPane(background, rect);
              stack.setPickOnBounds(false);
              VBox vbox = new VBox(stack, slider);
              vbox.setSpacing(50);
              vbox.setAlignment(Pos.CENTER);
              vbox.setMaxWidth(VBox.USE_PREF_SIZE);
              vbox.setMaxHeight(VBox.USE_PREF_SIZE);

              Scene scene = new Scene(new StackPane(vbox), 640, 480, true);
              scene.setCamera(new PerspectiveCamera());
              stage.setScene(scene);
              stage.setTitle("HelloRectangle3D");
              stage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }
      }

            psafrata Pavel Ĺ afrata
            rbair Richard Bair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: