我使用javaFX在java中编写了示例3D代码,java报告说我的directx版本已经过时,它促使我安装了更高版本。这是消息
设备“移动英特尔(R)45高速芯片组家族(微软 Corporation - WDDM 1.1)“(\。\ DISPLAY1)初始化失败: 警告:检测到错误的驱动程序版本,设备已禁用。请更新 你的驱动程序至少是版本8.15.10.2302
我检查了我的directx对话框,一切都还好!这是截图
而且,我有directX版本11!所以我不知道为什么java(1.8)抱怨我没有版本8 ??
这是我已经编译的示例代码,但只显示了一个带有错误列表的空白窗口
//D3Shapes.java
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.PerspectiveCamera;
import javafx.scene.PointLight;
import javafx.scene.Scene;
import javafx.scene.shape.Box;
import javafx.scene.shape.Cylinder;
import javafx.scene.shape.DrawMode;
import javafx.scene.shape.Sphere;
import javafx.stage.Stage;
public class D3Shapes extends Application
{
public static void main(String[] args)
{
Application.launch(args);
}
@Override
public void start(Stage stage)
{
// Create a Box
Box box = new Box(100, 100, 100);
box.setDrawMode(DrawMode.LINE);
box.setTranslateX(150);
box.setTranslateY(0);
box.setTranslateZ(400);
// Create a Sphere
Sphere sphere = new Sphere(50, 20);
sphere.setDrawMode(DrawMode.LINE);
sphere.setTranslateX(300);
sphere.setTranslateY(-5);
sphere.setTranslateZ(400);
// Create a Cylinder
Cylinder cylinder = new Cylinder(40, 120, 5);
cylinder.setDrawMode(DrawMode.LINE);
cylinder.setTranslateX(500);
cylinder.setTranslateY(-25);
cylinder.setTranslateZ(600);
// Create a Light
PointLight light = new PointLight();
light.setTranslateX(350);
light.setTranslateY(100);
light.setTranslateZ(300);
// Create a Camera to view the 3D Shapes
PerspectiveCamera camera = new PerspectiveCamera(false);
camera.setTranslateX(100);
camera.setTranslateY(-50);
camera.setTranslateZ(300);
// Add the Shapes and the Light to the Group
Group root = new Group(box, sphere, cylinder, light);
// Create a Scene with depth buffer enabled
Scene scene = new Scene(root, 400, 200, true);
// Add the Camera to the Scene
scene.setCamera(camera);
// Add the Scene to the Stage
stage.setScene(scene);
// Set the Title of the Stage
stage.setTitle("An Example with specified Draw Mode");
// Display the Stage
stage.show();
}
}
这是程序运行时期间jvm的输出
Device "Mobile Intel(R) 45 Express Chipset Family (Microsoft Corporation - WDDM 1.1)" (\\.\DISPLAY1) initialization failed :
WARNING: bad driver version detected, device disabled. Please update your driver to at least version 8.15.10.2302
Dec 10, 2017 1:15:35 PM javafx.scene.paint.Material <init>
WARNING: System can't support ConditionalFeature.SCENE3D
Dec 10, 2017 1:15:35 PM javafx.scene.shape.Shape3D <init>
WARNING: System can't support ConditionalFeature.SCENE3D
Dec 10, 2017 1:15:35 PM javafx.scene.shape.Shape3D <init>
WARNING: System can't support ConditionalFeature.SCENE3D
Dec 10, 2017 1:15:35 PM javafx.scene.shape.Shape3D <init>
WARNING: System can't support ConditionalFeature.SCENE3D
Dec 10, 2017 1:15:35 PM javafx.scene.LightBase <init>
WARNING: System can't support ConditionalFeature.SCENE3D
Dec 10, 2017 1:15:36 PM javafx.scene.PerspectiveCamera <init>
WARNING: System can't support ConditionalFeature.SCENE3D
Dec 10, 2017 1:15:36 PM javafx.scene.Scene <init>
WARNING: System can't support ConditionalFeature.SCENE3D
Dec 10, 2017 1:15:36 PM javafx.scene.Scene$7 invalidated
WARNING: System can't support ConditionalFeature.SCENE3D
Dec 10, 2017 1:15:36 PM javafx.scene.shape.Mesh <init>
WARNING: System can't support ConditionalFeature.SCENE3D
Dec 10, 2017 1:15:36 PM javafx.scene.shape.Mesh <init>
WARNING: System can't support ConditionalFeature.SCENE3D
Dec 10, 2017 1:15:36 PM javafx.scene.shape.Mesh <init>
WARNING: System can't support ConditionalFeature.SCENE3D
任何有形的帮助都将受到赞赏,因为我需要3D功能才能继续使用相当庞大的工程软件。顺便说一下,我已经将我的Windows 7旗舰版操作系统更新到了服务包2,我运行的Windows很少更新。非常感谢!