Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaFX 2.2: Enable OpenGL on Windows

1008054May 9 2013 — edited May 14 2013
Hi,

I have an application that was built on swing and opengl using jogl. I am starting V2 and I want to include JavaFX for the many benefits it provides. My main problem is this:

I Cannot force OpenGL on Windows! it's always Direct3d. I googled everything, it doesn't seem to be possible without hacking my way into a custom jre which seems like an incredibly unstable/bad idea to me.

I tried to force GPU and get the OpenGL context like this:

-Dprism.forceGPU -Dprism.order=es2,j2d

I even copied the jfxrt from the mac distribution to get the missing java/classes and I even downloaded the prism-es2.dll library, and the logs show me this:

Is there a way? Can I get the WinGLFactory and relative classes from somewhere?

Thanks,

Beess

Log

Prism pipeline init order: es2 j2d
Using t2k for text rasterization
Using dirty region optimizations
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library ... prism-es2
succeeded.
GLFactory using com.sun.prism.es2.gl.win.WinGLFactory
Prism pipeline name = com.sun.prism.j2d.J2DPipeline
(X) Got class = class com.sun.prism.j2d.J2DPipeline
Initialized prism pipeline: com.sun.prism.j2d.J2DPipeline
GLFactory.static - Platform: Windows 7 - not available: com.sun.prism.es2.gl.win.WinGLFactory
java.lang.ClassNotFoundException: com.sun.prism.es2.gl.win.WinGLFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:188)
at com.sun.prism.es2.gl.GLFactory$1.run(GLFactory.java:70)
at com.sun.prism.es2.gl.GLFactory$1.run(GLFactory.java:64)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.prism.es2.gl.GLFactory.<clinit>(GLFactory.java:64)
at com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:60)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:188)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:150)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:73)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:97)
at java.lang.Thread.run(Thread.java:722)
GraphicsPipeline.createPipeline failed for com.sun.prism.es2.ES2Pipeline
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:188)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:150)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:73)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:97)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: No native platform GLFactory available.
at com.sun.prism.es2.gl.GLFactory.getFactory(GLFactory.java:91)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2013
Added on May 9 2013
4 comments
14,344 views