我想我已经阅读了有关RPi上JFx下3D问题的所有可用解决方案,以下都不符合我的需求。我对2D应用程序没有任何问题。 但是当我尝试运行3D程序时,所有3D元素都消失了。此命令后:
java -Djavafx.platform=eglfb -Dprism.verbose=true -Dcom.sun.javafx.experimental.embedded.3d=true -Dprism.glDepthSize=24 -Dprism.forceGPU=true -jar Brake_Check.jar
我明白了:
Prism pipeline init order: es2 sw
Using java-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library ... prism_es2
succeeded.
GLFactory using com.sun.prism.es2.X11GLFactory
GraphicsPipeline.createPipeline failed for com.sun.prism.es2.ES2Pipeline
java.lang.UnsatisfiedLinkError: com.sun.prism.es2.X11GLFactory.nInitialize([I)J
at com.sun.prism.es2.X11GLFactory.nInitialize(Native Method)
at com.sun.prism.es2.X11GLFactory.initialize(X11GLFactory.java:146)
at com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:81)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.lang.Thread.run(Thread.java:748)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
(X) Got class = class com.sun.prism.sw.SWPipeline
Initialized prism pipeline: com.sun.prism.sw.SWPipeline
vsync: true vpipe: false
lip 19, 2019 3:31:53 AM javafx.scene.paint.Material <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:53 AM javafx.scene.shape.Shape3D <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:53 AM javafx.scene.shape.Shape3D <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:53 AM javafx.scene.shape.Shape3D <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:53 AM javafx.scene.shape.Shape3D <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:53 AM javafx.scene.shape.Shape3D <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:53 AM javafx.scene.PerspectiveCamera <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:53 AM javafx.scene.LightBase <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:54 AM javafx.scene.shape.Mesh <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:54 AM javafx.scene.shape.Shape3D <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:54 AM javafx.scene.paint.Material <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:54 AM javafx.scene.SubScene <init>
WARNING: System can't support ConditionalFeature.SCENE3D
lip 19, 2019 3:31:54 AM javafx.scene.SubScene <init>
WARNING: System can't support antiAliasing
我已经安装了armv6hf-sdk-8.60.9
任何建议我都会感激。
修改
经过进一步的研究,我还添加了OpenJFX:
apt-get install openjfx
总体上有一些小的改进,但是仍然缺少一些东西。
也许我会从头开始。我使用tutorial为Raspberry设置JavaFX,然后丢失了libprism_es2.so
,因此我从/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/arm/libprism_es2_eglfb.so
复制并重命名了它(我选择了这个,因为我想如果使用-Djavafx.platform=eglfb
参数,将是一个不错的选择),现在我添加了OpenJFX,那里还应该安装什么?您认为较新版本的sdk可能会有所帮助吗?但是另一方面,我担心我对Linux的操作知识太基础了,如果没有进步,那就是灾难?,所以我宁愿使用已经拥有的版本。
输出消息:
Prism pipeline init order: es2 sw
Using java-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library ... prism_es2
succeeded.
GLFactory using com.sun.prism.es2.X11GLFactory
(X) Got class = class com.sun.prism.es2.ES2Pipeline
Initialized prism pipeline: com.sun.prism.es2.ES2Pipeline
Maximum supported texture size: 8192
Maximum texture size clamped to 4096
Non power of two texture support = true
Maximum number of vertex attributes = 16
Maximum number of uniform vertex components = 16384
Maximum number of uniform fragment components = 16384
Maximum number of varying components = 128
Maximum number of texture units usable in a vertex shader = 32
Maximum number of texture units usable in a fragment shader = 32
Graphics Vendor: VMware, Inc.
Renderer: Gallium 0.4 on llvmpipe (LLVM 3.9, 128 bits)
Version: 3.0 Mesa 13.0.6
vsync: true vpipe: true
ES2ResourceFactory: Prism - createStockShader: Solid_LinearGradient_REFLECT.frag
lip 19, 2019 13:03:04 PM javafx.fxml.FXMLLoader$ValueElement processValue
WARNING: Loading FXML document with JavaFX API of version 9.0.1 by JavaFX runtime of version 8.0.111
ES2ResourceFactory: Prism - createStockShader: FillPgram_Color.frag
ES2ResourceFactory: Prism - createStockShader: Solid_TextureRGB.frag
PPSRenderer: scenario.effect - createShader: Blend_SRC_IN
new alphas
ES2ResourceFactory: Prism - createStockShader: Texture_Color.frag
QuantumRenderer: shutdown
您还有其他建议吗?
答案 0 :(得分:2)
因此,解决我的问题的主要方法是安装我之前已经提到的apt-get install openjfx
。之后,我也不再使用-Djavafx.platform=eglfb
。
发生的下一个问题是,一切都是黑色的。问题似乎是添加到场景中了(PointLight
)。删除它之后,一切看起来都好多了,但是...仍然存在一些缺陷。盒子上没有阴影,antiAliasing
不起作用,尽管只有一个简单的动画,但效果太差了。
编辑
快速更新。 一切工作正常。我也在项目中恢复了光芒。 我所做的就是更改RPi中的高级设置。
sudo raspi-config
然后进行高级操作,下一个GL Driver
,下一个GL (Full KMS) OpenGL desktop driver with full KMS
,保存并重新启动。