Open Kepler-Br opened 3 years ago
But isn't there any message in the stacktrace?
Ok looking at the code it looks like this happens if your graphic card does not support the es2 pipeline of JavaFX. @redrezo We should throw an IllegalStateException and provide the user some error message
So, it's impossible to use DriftFX with Intel 620, right?
Well 2 possibilities:
The first we although have to find out is why has OpenGL disabled
I reopen this one because we should definately fix the exception to tell the user what is going wrong
Hi, I've got the same issue with Intel(R) Iris(R) Plus Graphics 640 on my Linux (Elementary OS, based on Ubuntu 18.04LTS) Most likely this is caused by the wrong Prism pipeline recognition by the DriftFx code.
The JavaFX prints the following stats in my case:
Prism pipeline init order: es2 sw Using Double Precision Marlin 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
What clearly suggests ES2 pipeline usage. While, when tested the following:
println("Is ES2? ${Prism.isES2()}")
println("Is D3D? ${Prism.isD3D()}")
println("Is SW? ${Prism.isSW()}")
I do get all set to "false"
The problematic lines for prism pipeline selection are located in the "org.eclipse.fx.drift.internal.prism.Prims" class
String name = iDefaultResourceFactory.getClass().getName();
isD3D = "com.sun.prism.d3d.D3DResourceFactory".equals(name);
isES2 = "com.sun.prism.es2.ES2ResourceFactory".equals(name);
isSW = "com.sun.prism.sw.SWResourceFactory".equals(name);
Edit: It looks like for some reason the static initialization of "BaseDriftFXSurface" class failed and the "Prism.initialize()" function hasn't been called. Once I have manually invoked this DriftFx correctly recognizes the ES2 pipline.
@wgryglas
It looks like for some reason the static initialization of "BaseDriftFXSurface" class failed and the "Prism.initialize()" function hasn't been called. Once I have manually invoked this DriftFx correctly recognizes the ES2 pipline.
This is quite strange, the static initializer should be called - if its really not called then java itself would have an issue :/ Do you get an exception from the failed static initialization? It should fail with UnsupportedOperationException("Unknown JavaFX pipeline!") if it cannot find any pipeline. The only thing that comes to my mind is that maybe when you load the class your current class loader is not able to find the internal javafx classes. What Java Version are you using? And which ClassLoader / Thread creates your DriftFXSurface Instance? And which ClassLoader / Thread calls Prism.initialize() when it works. Also please add the Drift Version you are using when reporting an issue
@redrezo Sorry for the lack of description of my configuration. I was running it with Java 11 OpenJDK, Java FX 11 (with necessary modules opened) and 1.0.0.rc4 release of DriftFx. The DriftFxSurface was created in the main JavaFX thread, and in the same thread the Prism.initilize() was called.
As it looked strange to me that static initialization was not called I have tried to clean the project with gradle cleanJava task, but this hasn't resolved the issue. However, after some work and tests of different configurations, right now it looks like the program runs well even without explicit Prism.initialize(). As I was playing around with the code (all the time Prism.initilize() was called) it is hard for me to point out what has changed that might influence the execution.
I would assume it was some strange behavior related to class loader and probably not properly cleared/recompiled classes?
Currently, it looks like the problem does not exist. I will be working on it for some time and if I will come across this issue once again I will try to prepare a project with a valid code reproducing the issue.
I have Intel HD Graphics 620 which is Intel Core i5-8250U on my linux ubuntu 20.04 notebook. I was trying to run a demo from https://github.com/BestSolution-at/efxclipse-drift-samples. It starts, but when I push "start" it throws error at me which says:
But it starts perfectly on PC with Nvidia 1060 6gb which is also linux ubuntu 20.04. Have no idea what to do. Error message is quite cryptic. I have tried to change LWJGL version but nothing happens.