问题描述
操作系统:OSX Mountain Lion。
系统:虚拟BOX 4.2.6。
Java:1.7.0.40-ea-b34
我想禁用我的硬件加速JAVAFX应用程序,因为我的系统(mac)上没有硬件加速。因此,当没有硬件加速时,我在执行我的JAVAFX应用程序时遇到致命错误。这个错误与Prism Engine管道有关,它发生在java试图执行openGL本机库时。所以我想禁用棱镜。
I want to disable hardware acceleration for my JAVAFX app because there is no HW acceleration on my system (mac). So when there is no HW acceleration I am getting fatal error on executing my JAVAFX App. The error related to "Prism Engine pipeline" and it happen when java trying to execute openGL native libs. So i want to disable the prism.
我看到有一些控制棱镜行为的vm args如..
Dprism.forceGPU = true;
I see there is some vm args that control prism behavior like..Dprism.forceGPU=true;
上面有什么禁止prism或openGL请求吗?
Is there anything like above to disable prism or openGL requesting?
致命错误(openGl相关代码)
The Fatal error (openGl related codes)
Stack: [0x000000016c8f9000,0x000000016c9f9000], sp=0x000000016c9f7f40, free space=1019k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libobjc.A.dylib+0x639f] objc_msgSend_fixup+0x5f
C [AppKit+0x28134c] -[NSOpenGLContext initWithFormat:shareContext:]+0xac
C [libprism-es2.dylib+0x4e9f] createContext+0x1b3
C [libprism-es2.dylib+0x4729] Java_com_sun_prism_es2_gl_mac_MacGLFactory_nInitialize+0xa2
j com.sun.prism.es2.gl.mac.MacGLFactory.nInitialize([I)J+0
j com.sun.prism.es2.gl.mac.MacGLFactory.initialize(Ljava/lang/Class;Lcom/sun/prism/es2/gl/GLPixelFormat$Attributes;)Z+73
j com.sun.prism.es2.ES2Pipeline.<clinit>()V+54
推荐答案
看看这个论坛:
将此添加到您的Java执行中:
Add this to your java execution:
-Dprism.order=j2d
那应该是诀窍。
这篇关于如何在JavaFX中禁用或绕过硬件图形加速(Prism)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!