user6186835
user6186835

Reputation:

Increasing JavaFX WebGL Performance

I'm working on this browser in JavaFX. However.. When you visit a page that is using WebGL, the page loads but is extremely choppy and basically unusable.

So the question is, how would I increase the performance of a webpage using WebGL so the users can navigate the page smoothly?

Here's my demonstration

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;

  public final class App extends Application {

  @Override
  public void start(Stage stage) throws Exception {
        Group group = new Group();           
        WebView browser = new WebView();            
        WebEngine engine = browser.getEngine(); 

        engine.load("http://rune.tools/");

        group.getChildren().add(browser);

        Scene scene = new Scene(group, Color.BLACK);

        stage.setScene(scene);            
        stage.setTitle("JavaFX WebGL");            
        stage.centerOnScreen();
        stage.sizeToScene();   
        stage.setResizable(false);            
        stage.show();
  }

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

  }

Upvotes: 0

Views: 2434

Answers (1)

jewelsea
jewelsea

Reputation: 159406

JavaFX 8 doesn't support WebGL, so you can't increase WebGL performance of JavaFX, because it has nothing to increase.

Upvotes: 1

Related Questions