(Multi)Touch Ubuntu not working - where to look for implementation

2017-06-01 Thread Maurice
I'm using JavaFX on Ubuntu 17.04 and a touch screen capable of 10 
points. Officially the last only on Windows, but I think Ubuntu does 
support it too.


Unfortunately JavaFX claims that INPUT_TOUCH is false. I'd like to find 
out but do not know where to start. My assumption is that JavaFX settles 
for the synthesized mouse.


The output of "udevadm info --export-db" seems to acknowledge that 
Ubuntu sees the screen as a touch device, I've included a part of the 
output at the end of the email, but the line 'DRIVER=hid-multitouch" and 
' ID_INPUT_TOUCHSCREEN=1' give me that idea.


This leads me to the idea that I have to look inside the JavaFX 
implementation. However, it would be nice if I could have some pointer 
of where to start and what to look for.


For the record, I'm on JavaFX 8.

Maurice.

P: /devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001
E: 
DEVPATH=/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001

E: DRIVER=hid-multitouch
E: HID_ID=0003:2149:544D
E: HID_NAME=Weida Hi-TechCoolTouchR System
E: HID_PHYS=usb-:00:14.0-3/input0
E: HID_UNIQ=
E: MODALIAS=hid:b0003g0004v2149p544D
E: SUBSYSTEM=hid

P: 
/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/hidraw/hidraw0

N: hidraw0
E: DEVNAME=/dev/hidraw0
E: 
DEVPATH=/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/hidraw/hidraw0

E: MAJOR=246
E: MINOR=0
E: SUBSYSTEM=hidraw

P: 
/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/input/input4

E: ABS=2608003
E: 
DEVPATH=/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/input/input4

E: EV=b
E: ID_BUS=usb
E: ID_FOR_SEAT=input-pci-_00_14_0-usb-0_3_1_0
E: ID_INPUT=1
E: ID_INPUT_TOUCHSCREEN=1
E: ID_MODEL=CoolTouchR_System
E: 
ID_MODEL_ENC=CoolTouchR\x20System\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

E: ID_MODEL_ID=544d
E: ID_PATH=pci-:00:14.0-usb-0:3:1.0
E: ID_PATH_TAG=pci-_00_14_0-usb-0_3_1_0
E: ID_REVISION=1330
E: ID_SERIAL=Weida_Hi-Tech_CoolTouchR_System
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030102:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Weida_Hi-Tech
E: 
ID_VENDOR_ENC=Weida\x20Hi-Tech\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

E: ID_VENDOR_ID=2149
E: KEY=400 0 0 0 0 0
E: MODALIAS=input:b0003v2149p544De0110-e0,1,3,k14A,ra0,1,2F,35,36,39,mlsfw
E: NAME="Weida Hi-TechCoolTouchR System "
E: PHYS="usb-:00:14.0-3/input0"
E: PRODUCT=3/2149/544d/110
E: PROP=2
E: SUBSYSTEM=input
E: TAGS=:seat:
E: UNIQ=""
E: USEC_INITIALIZED=6371585

P: 
/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/input/input4/event4

N: input/event4
S: input/by-id/usb-Weida_Hi-Tech_CoolTouchR_System-event-if00
S: input/by-path/pci-:00:14.0-usb-0:3:1.0-event
E: 
DEVLINKS=/dev/input/by-id/usb-Weida_Hi-Tech_CoolTouchR_System-event-if00 
/dev/input/by-path/pci-:00:14.0-usb-0:3:1.0-event

E: DEVNAME=/dev/input/event4
E: 
DEVPATH=/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/input/input4/event4

E: ID_BUS=usb
E: ID_INPUT=1
E: ID_INPUT_HEIGHT_MM=268
E: ID_INPUT_TOUCHSCREEN=1
E: ID_INPUT_WIDTH_MM=474
E: ID_MODEL=CoolTouchR_System
E: 
ID_MODEL_ENC=CoolTouchR\x20System\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

E: ID_MODEL_ID=544d
E: ID_PATH=pci-:00:14.0-usb-0:3:1.0
E: ID_PATH_TAG=pci-_00_14_0-usb-0_3_1_0
E: ID_REVISION=1330
E: ID_SERIAL=Weida_Hi-Tech_CoolTouchR_System
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030102:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Weida_Hi-Tech
E: 
ID_VENDOR_ENC=Weida\x20Hi-Tech\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

E: ID_VENDOR_ID=2149
E: LIBINPUT_DEVICE_GROUP=3/2149/544d/110:usb-:00:14.0-3
E: MAJOR=13
E: MINOR=68
E: SUBSYSTEM=input
E: USEC_INITIALIZED=6499966

P: 
/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/input/input4/mouse0

N: input/mouse0
E: DEVNAME=/dev/input/mouse0
E: 
DEVPATH=/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/input/input4/mouse0

E: ID_BUS=usb
E: ID_INPUT=1
P: /devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001
E: 
DEVPATH=/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001

E: DRIVER=hid-multitouch
E: HID_ID=0003:2149:544D
E: HID_NAME=Weida Hi-TechCoolTouchR System
E: HID_PHYS=usb-:00:14.0-3/input0
E: HID_UNIQ=
E: MODALIAS=hid:b0003g0004v2149p544D
E: SUBSYSTEM=hid

P: 
/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/hidraw/hidraw0

N: hidraw0
E: DEVNAME=/dev/hidraw0
E: 
DEVPATH=/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/hidraw/hidraw0

E: MAJOR=246
E: MINOR=0
E: SUBSYSTEM=hidraw

P: 
/devices/pci:00/:00:14.0/usb1/1-3/1-3:1.0/0003:2149:544D.0001/input/input4

E: ABS=2608003
E: 
DEVPATH=/devices/pci:00/:00:14.0/usb1/1-3/1-

com.sun.media.jfxmedia.locator.Locator: Unsupported protocol "bundle"

2016-03-09 Thread Maurice
When I tried to load a wav file from my OSGi bundle's resources JavaFX 
reported that it could not load the file because the protocol "bundle" 
is unsupported. I checked the code and indeed, it is not supported.


However I wondered why the Locator doesn't use the same mechanism as the 
font loader. The font loader opens the input stream, downloads the file 
to a temporary folder and then opens the file, whereas the sound locator 
just balks at the protocol.


Maurice.


JavaFX 9 / JRE 9 on ARMv7

2016-03-08 Thread Maurice
Given that development of JavaFX 9 will switch to JRE 9 completely 
anytime soon I'm thinking of switching to JavaFX 9 and a JRE 9. However, 
do the freely available JVMs for ARMv7 32bit have a JIT?


Maurice.


Re: ELF class problems when Video playback on RaspberryPI

2016-03-06 Thread Maurice

Looks like you are using a 64-bit library on a 32-bit ARM.

Maurice.

Op 06-03-16 om 19:06 schreef Hrvoje Crnjak:

Hi all,

first of all, sorry for spamming your mailing list.
Recently I started building JavaFX appllication on RaspberryPi.
The idea of this application is to play .*mp4* videos on demand.

But when I try to use FX Media components (player, view, etc.) in order to
play the Video, I get the following problem :

Java HotSpot(TM) Client VM warning: You have loaded library
/home/pi/java/jdk1.8.0_73/jre/lib/arm/libjfxmedia.so which might have
disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c
', or link it with '-z noexecstack'.

Caused by: java.lang.UnsatisfiedLinkError:
/home/pi/java/jdk1.8.0_73/jre/lib/arm/libjfxmedia.so:
/home/pi/java/jdk1.8.0_73/jre/lib/arm/libjfxmedia.so: wrong ELF class:
ELFCLASS64 (Possible cause: architecture word width mismatch)

I wrote about it in detail here :
https://www.raspberrypi.org/forums/viewtopic.php?f=81=138698=920390#p920390

I used JavaFX build from @chriswhocodes (http://108.61.191.178/)

Could you help me out please?
I really don't know where to go from here.
If you could at least point me out in the right direction I would be very
grateful.

Thanks for your time and sorry for the spam!

Best regards,
Hrvoje Crnjak




Re: FTFactory.java: Fonts loaded by Pango are never registered and always return

2016-03-03 Thread Maurice
I'm running on Ubuntu desktop, and I can gladly report that it works 
fine. I think I saw fp wasn't null, but I'll check later. Maybe my only 
fix was ignoring a 'false'.  According to 
https://www.freebsd.org/cgi/man.cgi?query=fontconfig=3=0=XFree86+4.5.0 
FcConfigAppFontAddFile returns a FcBool, and I did see the rc is 0.


Although ignoring the result does work, can it be something that is 
lacking in the environment? The Yocto embedded Linux is naked from the 
start, so it is totally possible that something else is missing.


Maurice.
(my pride on finding the flaw is quickly diminishing...)

Op 03-03-16 om 17:20 schreef Philip Race:

Since I don't see any code here that looks like it would run only on
an embedded environment then I wonder why Linux desktop users
are not reporting the same problem ?

Did your instrumentation check that both dlopen & dlsym succeeeded ?

-phil.

On 3/3/16, 7:43 AM, Maurice wrote:
Hmm  I think I have to agree with you... you are right. 
Commenting it in didn't give a compiler or linkage error, and it made 
it work. I'm happy at the moment and tired of the debugging process, 
but I'll give it more thought later.


Op 03-03-16 om 16:36 schreef Mario Torre:

On Thu, Mar 3, 2016 at 2:48 PM, Maurice <i...@cuhka.com> wrote:

At the moment the embedded environment I'm using is not able to use
downloaded or external supplied fonts. I've traced through the 
system and
found that it looks like it fails in pango.c 
FcConfigAppFontAddFile, at
least OSPango.FcConfigAppFontAddFile returns false, thus 
propagating a null

all the way up.

Checking the pango.c file I noticed something very interesting:
JNIEXPORT jboolean JNICALL OS_NATIVE(FcConfigAppFontAddFile)
 (JNIEnv *env, jclass that, jlong arg0, jstring arg1)
{
 static void *fp = NULL;
 if (!fp) {
 void* handle = dlopen(LIB_FONTCONFIG, RTLD_LAZY);
 if (handle) fp = dlsym(handle, "FcConfigAppFontAddFile");
 }
 jboolean rc = 0;
 if (arg1) {
 const char *text = (*env)->GetStringUTFChars(env, arg1, 
NULL);

 if (text) {
//rc = (jboolean)FcConfigAppFontAddFile(arg0, text);
 if (fp) {
 rc = (jboolean)((jboolean (*)(jlong, const char 
*))fp)(arg0,

text);
 }
 (*env)->ReleaseStringUTFChars(env, arg1, text);
 }
 }
 return rc;
}

Yes, you see it correctly! The line that actually should register 
the font

Pointer to functions make me blind too, but If I'm not reading it
wrong, I think this is not a commented code call, it's meant to tell
what the code below it does (apparently, it made blind also the
author!):

FcConfigAppFontAddFile is dloaded into fp, so this totally
incomprehensible line:

((jboolean (*)(jlong, const char *))fp)(arg0, text);

it's just casting fp to a function that returns a jboolean and takes a
jlong and a const char array as argument, hence it becomes again:

(jboolean)FcConfigAppFontAddFile(arg0, text);

Cheers,
Mario






Re: FTFactory.java: Fonts loaded by Pango are never registered and always return

2016-03-03 Thread Maurice
Hmm  I think I have to agree with you... you are right. Commenting 
it in didn't give a compiler or linkage error, and it made it work. I'm 
happy at the moment and tired of the debugging process, but I'll give it 
more thought later.


Op 03-03-16 om 16:36 schreef Mario Torre:

On Thu, Mar 3, 2016 at 2:48 PM, Maurice <i...@cuhka.com> wrote:

At the moment the embedded environment I'm using is not able to use
downloaded or external supplied fonts. I've traced through the system and
found that it looks like it fails in pango.c FcConfigAppFontAddFile, at
least OSPango.FcConfigAppFontAddFile returns false, thus propagating a null
all the way up.

Checking the pango.c file I noticed something very interesting:
JNIEXPORT jboolean JNICALL OS_NATIVE(FcConfigAppFontAddFile)
 (JNIEnv *env, jclass that, jlong arg0, jstring arg1)
{
 static void *fp = NULL;
 if (!fp) {
 void* handle = dlopen(LIB_FONTCONFIG, RTLD_LAZY);
 if (handle) fp = dlsym(handle, "FcConfigAppFontAddFile");
 }
 jboolean rc = 0;
 if (arg1) {
 const char *text = (*env)->GetStringUTFChars(env, arg1, NULL);
 if (text) {
//rc = (jboolean)FcConfigAppFontAddFile(arg0, text);
 if (fp) {
 rc = (jboolean)((jboolean (*)(jlong, const char *))fp)(arg0,
text);
 }
 (*env)->ReleaseStringUTFChars(env, arg1, text);
 }
 }
 return rc;
}

Yes, you see it correctly! The line that actually should register the font

Pointer to functions make me blind too, but If I'm not reading it
wrong, I think this is not a commented code call, it's meant to tell
what the code below it does (apparently, it made blind also the
author!):

FcConfigAppFontAddFile is dloaded into fp, so this totally
incomprehensible line:

((jboolean (*)(jlong, const char *))fp)(arg0, text);

it's just casting fp to a function that returns a jboolean and takes a
jlong and a const char array as argument, hence it becomes again:

(jboolean)FcConfigAppFontAddFile(arg0, text);

Cheers,
Mario




FTFactory.java: Fonts loaded by Pango are never registered and always return

2016-03-03 Thread Maurice
At the moment the embedded environment I'm using is not able to use 
downloaded or external supplied fonts. I've traced through the system 
and found that it looks like it fails in pango.c FcConfigAppFontAddFile, 
at least OSPango.FcConfigAppFontAddFile returns false, thus propagating 
a null all the way up.


Checking the pango.c file I noticed something very interesting:
JNIEXPORT jboolean JNICALL OS_NATIVE(FcConfigAppFontAddFile)
(JNIEnv *env, jclass that, jlong arg0, jstring arg1)
{
static void *fp = NULL;
if (!fp) {
void* handle = dlopen(LIB_FONTCONFIG, RTLD_LAZY);
if (handle) fp = dlsym(handle, "FcConfigAppFontAddFile");
}
jboolean rc = 0;
if (arg1) {
const char *text = (*env)->GetStringUTFChars(env, arg1, NULL);
if (text) {
//rc = (jboolean)FcConfigAppFontAddFile(arg0, text);
if (fp) {
rc = (jboolean)((jboolean (*)(jlong, const char 
*))fp)(arg0, text);

}
(*env)->ReleaseStringUTFChars(env, arg1, text);
}
}
return rc;
}

Yes, you see it correctly! The line that actually should register the 
font with pango is commented out! I removed the comment, but still the 
result is false. I then overruled the return code in FTFactory.java 
registerEmbeddedFont to be always true after it has called the native 
function, and voilà, there are my external fonts.


What a journey.... :-)

Maurice.


LinuxTouchTransform: wrong range on flipXY and continuus re-calculation

2016-03-02 Thread Maurice
It seems to me that  initTransform(int axis, int index) in 
LinuxTouchTransform calculates the wrong range. Regardless of the flipXY 
setting it uses for the ABS_X the device's width and for the ABS_Y the 
device's height. While in case with flipXY it should use for ABS_X the 
device's height and for ABS_Y as the device's width.


Without this correction it becomes impossible to 'calibrate' a touch 
screen, especially if the minX and minY aren't zero.


As an aside, I noticed that the LinuxTouchTransform's initTransform is 
called every time a touch event is delivered to the system. This seems 
unnecessary, as long as the screen is the same screen all transforms and 
scalars will remain the same for each touch event.


Regards,
Maurice.


Re: GLS language errors (Was: Internal error: Error loading stock shader FillRoundRect_LinearGradient,_PAD on Vivante ARM)

2016-03-01 Thread Maurice


Jim,

A solution in line of that of Johan Vos [1] works. JavaFX can be run and 
doesn't crash on startup when compiling the shaders. I think they should 
be taken into account for at least JavaFX 9, as it reduces a very 
serious bug to a possible optimization.


Maurice.

[1] 
https://bitbucket.org/javafxports/8u60-rt/commits/595633bbaae36f98d85d47d276294442ea43488c


Op 02-03-16 om 02:22 schreef Jim Graham:
The thing about this use of pixcoord is that the same information can 
be supplied much more efficiently as a pair of texture coordinates.  
The value of pixcoord ends up being a linear equation over the area of 
the primitive which is exactly what texture coordinate samples give 
you for free.


I believe some of the other gradient methods use that texture 
coordinate technique to avoid having to use pixcoord, but the issue is 
that we've hard-coded all of our VertexBuffer streams to have exactly 
2 sets of texture coordinates and so you only get room to pass in so 
many values and these (i.e. this family of) shaders are already using 
those texture coordinates to pass in too many values to leave enough 
free for the gradient fractions.


This shader could be avoided, I believe, by rasterizing the shape into 
an alpha mask and using one of the alpha mask gradient shaders that 
doesn't rely on pixcoord.  In fact, in some embedded environments 
these shaders have so many computations per pixel that running the 
shape rasterizer on the CPU actually wins performance (and especially 
if you cache the alpha masks as some of our NGShape nodes do)...


...jim

On 3/1/16 9:10 AM, Maurice wrote:




Re: GLS language errors

2016-03-01 Thread Maurice
Not only does it reduce the amount of errors, but I'm able to run 
Ensemble, until now without any errors. Therefore it seems to be the 
right solution.


Maurice.

Prism pipeline init order: es2 sw
Using native-based Pisces rasterizer
Using dirty region optimizations
Using system sized 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_monocle
Loaded /opt/cuhka/jre/lib/ext/../arm/libprism_es2_monocle.so from 
relative path

succeeded.
GLFactory using com.sun.prism.es2.MonocleGLFactory
Loaded /opt/cuhka/jre/lib/ext/../arm/libglass_monocle.so from relative path
(X) Got class = class com.sun.prism.es2.ES2Pipeline
Initialized prism pipeline: com.sun.prism.es2.ES2Pipeline
JavaFX: using com.sun.javafx.tk.quantum.QuantumToolkit
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 = 1024
Maximum number of uniform fragment components = 896
Maximum number of varying components = 44
Maximum number of texture units usable in a vertex shader = 4
Maximum number of texture units usable in a fragment shader = 8
Graphics Vendor: Vivante Corporation
   Renderer: Vivante GC2000
Version: OpenGL ES 3.0 V5.0.11.p7.33433
 vsync: true vpipe: true
Calling main(String[]) method
Loaded /opt/cuhka/jre/lib/ext/../arm/libjavafx_font.so from relative path
Loaded /opt/cuhka/jre/lib/ext/../arm/libjavafx_font_freetype.so from 
relative path
Loaded /opt/cuhka/jre/lib/ext/../arm/libjavafx_font_pango.so from 
relative path

max rectangle texture cell size = 89
wrap rectangle texture = 2 x 2
ES2ResourceFactory: Prism - createStockShader: AlphaTexture_Color.frag
Feb 27, 2016 5:47:26 PM com.sun.javafx.css.StyleManager 
loadStylesheetUnPrivileged
INFO: Could not load @font-face font 
[http://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGEMbjGELOEJD5J8DUmxkO-A.ttf]

ES2ResourceFactory: Prism - createStockShader: Texture_Color.frag
Feb 27, 2016 5:47:27 PM com.sun.javafx.css.StyleManager 
loadStylesheetUnPrivileged
INFO: Could not load @font-face font 
[http://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGMw1o1eFRj7wYC6JbISqOjY.ttf]

ES2ResourceFactory: Prism - createStockShader: Solid_TextureRGB.frag
Feb 27, 2016 5:47:27 PM com.sun.javafx.css.StyleManager 
loadStylesheetUnPrivileged
INFO: Could not load @font-face font 
[http://fonts.gstatic.com/s/sourcesanspro/v9/ODelI1aHBYDBqgeIAH2zlNzbP97U9sKh0jjxbPbfOKg.ttf]
Feb 27, 2016 5:47:27 PM com.sun.javafx.css.StyleManager 
loadStylesheetUnPrivileged
INFO: Could not load @font-face font 
[http://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGNNE-IuDiR70wI4zXaKqWCM.ttf]
ES2ResourceFactory: Prism - createStockShader: 
AlphaTexture_LinearGradient.frag

ES2ResourceFactory: Prism - createStockShader: Mask_TextureSuper.frag
Loading Prism common native library ...
Loaded /opt/cuhka/jre/lib/ext/../arm/libprism_common.so from relative path
succeeded.
ES2ResourceFactory: Prism - createStockShader: FillRoundRect_Color.frag
ES2ResourceFactory: Prism - createStockShader: 
FillRoundRect_LinearGradient_PAD.frag

ES2ResourceFactory: Prism - createStockShader: AlphaOne_Color.frag
PPSRenderer: scenario.effect - createShader: LinearConvolveShadow_20
PPSRenderer: scenario.effect - createShader: PhongLighting_DISTANT
ES2ResourceFactory: Prism - createStockShader: 
AlphaTexture_RadialGradient.frag

PPSRenderer: scenario.effect - createShader: Blend_SRC_IN



Op 01-03-16 om 20:10 schreef Maurice:
Moving the declaration into the main() method reduces the amount of 
errors found by the glslangValidator drastically




Re: GLS language errors

2016-03-01 Thread Maurice
Moving the declaration into the main() method reduces the amount of 
errors found by the glslangValidator drastically, though it still finds 
several issues:


./modules/graphics/src/main/resources/com/sun/prism/es2/glsl/normalMap_texture.frag
ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
ERROR: 0:53: '=' :  cannot convert from 'const float' to 'temp highp 
4-component vector of float'

ERROR: 3 compilation errors.  No code generated.


./modules/graphics/src/main/resources/com/sun/prism/es2/glsl/specular_texture.frag
ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp highp 
3-component vector of float'

ERROR: 5 compilation errors.  No code generated.


./modules/graphics/src/main/resources/com/sun/prism/es2/glsl/selfIllum_texture.frag
ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
WARNING: 0:53: 'return' : type conversion on return values was not 
explicitly allowed until version 420

ERROR: 2 compilation errors.  No code generated.


./modules/graphics/src/main/resources/com/sun/prism/es2/glsl/specular_mix.frag
ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp highp 
3-component vector of float'

ERROR: 5 compilation errors.  No code generated.

./modules/graphics/build/resources/main/com/sun/prism/es2/glsl/normalMap_texture.frag
ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
ERROR: 0:53: '=' :  cannot convert from 'const float' to 'temp highp 
4-component vector of float'

ERROR: 3 compilation errors.  No code generated.


./modules/graphics/build/resources/main/com/sun/prism/es2/glsl/specular_texture.frag
ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp highp 
3-component vector of float'

ERROR: 5 compilation errors.  No code generated.


./modules/graphics/build/resources/main/com/sun/prism/es2/glsl/selfIllum_texture.frag
ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
WARNING: 0:53: 'return' : type conversion on return values was not 
explicitly allowed until version 420

ERROR: 2 compilation errors.  No code generated.


./modules/graphics/build/resources/main/com/sun/prism/es2/glsl/specular_mix.frag
ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp highp 
3-component vector of float'

ERROR: 5 compilation errors.  No code generated.



Re: GLS language errors (Was: Internal error: Error loading stock shader FillRoundRect_LinearGradient,_PAD on Vivante ARM)

2016-03-01 Thread Maurice
I'm not very familiar with shader coding, but can't this be solved by 
putting a non-constant modifier in fron of it? I notice other variables 
are declared as 'varying' or 'uniform'.


Maurice.

Op 29-02-16 om 20:45 schreef Johan Vos:

Hi,

It seems to me you might be running in the same issue we had on 
Android with the recent Adreno drivers:

http://mail.openjdk.java.net/pipermail/openjfx-dev/2015-July/017575.html

See that thread for discussion, and for a fix-proposal here: 
https://bitbucket.org/javafxports/8u60-rt/commits/595633bbaae36f98d85d47d276294442ea43488c


Reading back that thread, I still have a todo on trying to find a 
generic solution for this...


- Johan

On Sun, Feb 28, 2016 at 6:33 PM, Maurice <i...@cuhka.com 
<mailto:i...@cuhka.com>> wrote:


  When I run the glslangValidator on
FillRoundRect_LinearGradient_PAD.frag it gives the following error:
ERROR: 0:19: 'non-constant global initializer' : not supported
with this profile: es

When I move pixcoord's declaration on line 19 into the main()
function it gives no errors.

This is the full output of find -name "*.frag" -exec
glslangValidator {} \;

ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
ERROR: 0:53: '=' :  cannot convert from 'const float' to 'temp
highp 4-component vector of float'
ERROR: 3 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp
highp 3-component vector of float'
ERROR: 5 compilation errors.  No code generated.


ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
WARNING: 0:53: 'return' : type conversion on return values was not
explicitly allowed until version 420
ERROR: 2 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp
highp 3-component vector of float'
ERROR: 5 compilation errors.  No code generated.


ERROR: 0:18: 'non-constant global initializer' : not supported
with this profile: es
ERROR: 1 compilation errors.  No code generated.


ERROR: 0:18: 'non-constant global initializer' : not supported
with this profile: es
ERROR: 1 compilation errors.  No code generated.


ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
ERROR: 0:53: '=' :  cannot convert from 'const float' to 'temp
highp 4-component vector of float'
ERROR: 3 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp
highp 3-component vector of float'
ERROR: 5 compilation errors.  No code generated.


ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
WARNING: 0:53: 'return' : type conversion on return values was not
explicitly allowed until version 420
ERROR: 2 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp
highp 3-component vector of float'
ERROR: 5 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported
with this profile: es
ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported
with this profile: es
ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported
with this profile: es
ERROR: 1 compilation errors.  No code generated.


ERROR: 0:17: 'non-constant global initializer' : not supported
with this profile: es
ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported
with this profile: es
ERROR

Re: GLS language errors (Was: Internal error: Error loading stock shader FillRoundRect_LinearGradient,_PAD on Vivante ARM)

2016-02-29 Thread Maurice
It looks like the same issue indeed and I second the remark "Don't refer 
to e.g. gl_FragCoord in the header, but put it in main."


When running the egl language validator there were additional errors though:
ERROR: 0:53: 'texture2D' : no matching overloaded function found
WARNING: 0:53: 'return' : type conversion on return values was not 
explicitly allowed until version 420


Should I still file a bug, or put additional information in an existing one?

As an aside, for me to continue, should I try to build a Yocto image 
with an older driver?


Maurice.

Op 29-02-16 om 20:45 schreef Johan Vos:

Hi,

It seems to me you might be running in the same issue we had on 
Android with the recent Adreno drivers:

http://mail.openjdk.java.net/pipermail/openjfx-dev/2015-July/017575.html

See that thread for discussion, and for a fix-proposal here: 
https://bitbucket.org/javafxports/8u60-rt/commits/595633bbaae36f98d85d47d276294442ea43488c


Reading back that thread, I still have a todo on trying to find a 
generic solution for this...


- Johan

On Sun, Feb 28, 2016 at 6:33 PM, Maurice <i...@cuhka.com 
<mailto:i...@cuhka.com>> wrote:


  When I run the glslangValidator on
FillRoundRect_LinearGradient_PAD.frag it gives the following error:
ERROR: 0:19: 'non-constant global initializer' : not supported
with this profile: es

When I move pixcoord's declaration on line 19 into the main()
function it gives no errors.

This is the full output of find -name "*.frag" -exec
glslangValidator {} \;

ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
ERROR: 0:53: '=' :  cannot convert from 'const float' to 'temp
highp 4-component vector of float'
ERROR: 3 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp
highp 3-component vector of float'
ERROR: 5 compilation errors.  No code generated.


ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
WARNING: 0:53: 'return' : type conversion on return values was not
explicitly allowed until version 420
ERROR: 2 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp
highp 3-component vector of float'
ERROR: 5 compilation errors.  No code generated.


ERROR: 0:18: 'non-constant global initializer' : not supported
with this profile: es
ERROR: 1 compilation errors.  No code generated.


ERROR: 0:18: 'non-constant global initializer' : not supported
with this profile: es
ERROR: 1 compilation errors.  No code generated.


ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
ERROR: 0:53: '=' :  cannot convert from 'const float' to 'temp
highp 4-component vector of float'
ERROR: 3 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp
highp 3-component vector of float'
ERROR: 5 compilation errors.  No code generated.


ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
WARNING: 0:53: 'return' : type conversion on return values was not
explicitly allowed until version 420
ERROR: 2 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp
highp 3-component vector of float'
ERROR: 5 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported
with this profile: es
ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported
with this profile: es
ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 

Re: GLS language errors (Was: Internal error: Error loading stock shader FillRoundRect_LinearGradient,_PAD on Vivante ARM)

2016-02-29 Thread Maurice
Should I file a bug? I can't determine whether this is a client platform 
issue or a major bug in the EGL that JavaFX is using. In any case, it 
does not work on my embedded device.


Maurice.

Op 28-02-16 om 18:33 schreef Maurice:
  When I run the glslangValidator on 
FillRoundRect_LinearGradient_PAD.frag it gives the following error:
ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es


When I move pixcoord's declaration on line 19 into the main() function 
it gives no errors.


This is the full output of find -name "*.frag" -exec glslangValidator 
{} \;


ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
ERROR: 0:53: '=' :  cannot convert from 'const float' to 'temp highp 
4-component vector of float'

ERROR: 3 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp highp 
3-component vector of float'

ERROR: 5 compilation errors.  No code generated.


ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
WARNING: 0:53: 'return' : type conversion on return values was not 
explicitly allowed until version 420

ERROR: 2 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp highp 
3-component vector of float'

ERROR: 5 compilation errors.  No code generated.


ERROR: 0:18: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:18: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
ERROR: 0:53: '=' :  cannot convert from 'const float' to 'temp highp 
4-component vector of float'

ERROR: 3 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp highp 
3-component vector of float'

ERROR: 5 compilation errors.  No code generated.


ERROR: 0:53: 'oTexCoords' : undeclared identifier
ERROR: 0:53: 'texture2D' : no matching overloaded function found
WARNING: 0:53: 'return' : type conversion on return values was not 
explicitly allowed until version 420

ERROR: 2 compilation errors.  No code generated.


ERROR: 0:55: 'oTexCoords' : undeclared identifier
ERROR: 0:55: 'texture2D' : no matching overloaded function found
ERROR: 0:55: 'scalar swizzle' : not supported with this profile: es
ERROR: 0:55: 'rgb' : vector field selection out of range
ERROR: 0:55: '=' :  cannot convert from 'const float' to 'temp highp 
3-component vector of float'

ERROR: 5 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:17: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with 
this profile: es

GLS language errors (Was: Internal error: Error loading stock shader FillRoundRect_LinearGradient,_PAD on Vivante ARM)

2016-02-28 Thread Maurice
ant global initializer' : not supported with this 
profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with this 
profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with this 
profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:17: 'non-constant global initializer' : not supported with this 
profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with this 
profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with this 
profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with this 
profile: es

ERROR: 1 compilation errors.  No code generated.


ERROR: 0:19: 'non-constant global initializer' : not supported with this 
profile: es

ERROR: 1 compilation errors.  No code generated.



Op 27-02-16 om 19:10 schreef Maurice:
I'm running into the following exception when I start a simple JavaFX 
test program on my ARM based board:


Shader compile log: (21:0) : error : In declarations of global 
variables with no
 storage qualifier or with a const qualifier, any initializer must be 
a constant

 expression
(103:0) : error : undefined identifier: 'pixcoord'

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at 
com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFac

tory.java:312)
at 
com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderCont

ext.java:256)
at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderCon

text.java:477)
at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderCon

text.java:374)
at 
com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedPgram(Ba

seShaderGraphics.java:842)
at 
com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedRect(Bas

eShaderGraphics.java:601)
at 
com.sun.prism.impl.ps.BaseShaderGraphics.fillRoundRect(BaseShaderGrap

hics.java:1557)
at 
com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectanglesDirectly(N

GRegion.java:1119)
at 
com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectangle(NGRegion.j

ava:830)
at 
com.sun.javafx.sg.prism.NGRegion.renderAsRectangle(NGRegion.java:751)
at 
com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:572)

at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
at 
com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)

at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
at 
com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:477)
at 
com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:330)
at 
com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.jav

a:91)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51

1)
at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)

at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:617)
at 
com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Quantu

mRenderer.java:125)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Error creating fragment shader
at 
com.sun.prism.es2.ES2Shader.createFromSource(ES2Shader.java:141)
at 
com.sun.prism.es2.ES2Shader.createFromSource(ES2Shader.java:173)
at 
com.sun.prism.es2.ES2ResourceFactory.createShader(ES2ResourceFactory.

java:224)
at 
com.sun.prism.shader.FillRoundRect_LinearGradient_PAD_Loader.loadShad

er(FillRoundRect_LinearGradient_PAD_Loader.java:53)
... 30 more
java.lang.InternalError: Error loading stock shader 
FillRoundRect_LinearGradient

_PAD
at 
com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFac

tory.java:315)
at 
com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderCont

ext.java:256)
at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderCon

text.java:477)
at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderCon

tex

Internal error: Error loading stock shader FillRoundRect_LinearGradient,_PAD on Vivante ARM

2016-02-27 Thread Maurice
)
at 
com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:330)
at 
com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.jav

a:91)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51

1)
at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)

at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

.java:617)
at 
com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Quantu

mRenderer.java:125)
at java.lang.Thread.run(Thread.java:745)

Maurice.


0x3003: Could not get EGL surface

2016-02-22 Thread Maurice
Even though the system did not output to my LVDS screen JavaFX seemed to 
be content initializing with ES2.

GLFactory using com.sun.prism.es2.MonocleGLFactory
(X) Got class = class com.sun.prism.es2.ES2Pipeline
Initialized prism pipeline: com.sun.prism.es2.ES2Pipeline
Graphics Vendor: Vivante Corporation
   Renderer: Vivante GC2000
Version: OpenGL ES 3.0 V5.0.11.p7.33433
 vsync: true vpipe: true

I've fixed getting output to LVDS, unfortunately, I now get a 0x3003 
error when JavaFX starts.

Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library ... prism_es2_monocle
succeeded.
GLFactory using com.sun.prism.es2.MonocleGLFactory
traceConfig: Trying platform MX6 with class 
com.sun.glass.ui.monocle.MX6Platform

Factory
traceConfig: Matched MX6
com.sun.glass.ui.monocle.GLException: 0x3003: Could not get EGL surface
at 
com.sun.glass.ui.monocle.AcceleratedScreen.(AcceleratedScreen.


Here's somebody who at least got the same error[1], but there is no 
follow up on the thread.


What configuration change should I be paying attention at?


[1] https://community.freescale.com/thread/380842


Re: JFX as an OSGi service?

2016-02-20 Thread Maurice
I make sure that the application is basically only the primary stage, 
therefore it only needs to publish itself. All other UI and business 
logic is done by other bundles.


Op 20-02-16 om 15:50 schreef Stephen Winnall:
I have been trying a similar approach. I’m using declarative services 
and I have some @References  to other services in the Application, but 
I haven’t managed to get these instantiated. Do you have an approach 
for that? I suppose I can just write some code and instantiate them 
manually…


Steve





Re: JFX as an OSGi service?

2016-02-20 Thread Maurice
That is why the bundle activator creates a bundle-singleton of itself, 
that way the app can access the OSGi world. In my case to register 
itself as a service.



@Override
public void start(Stage primaryStage) throws Exception {

primaryStage.show();

Dictionary<String, ?> properties = createDictionary();
BundleContext bundleContext = 
UdooActivator.bundleActivator().getBundleContext();
bundleContext.registerService(com.cuhka.home.application.Application.class, 
this, properties);

    }

Maurice.
Op 20-02-16 om 15:08 schreef Stephen Winnall:

Hi Maurice

I have done something similar, but it has the following drawback in my view: 
the class launched (Udoo15App in your case) does not run under OSGi control, so 
it has no access to OSGi bundles or services, nor is it accessible by them. If 
you don’t need that, you're OK. But I need that class to be part of the OSGi 
world because other bundles/services are going to add parts to the UI as they 
are instantiated.

Steve


On 20 Feb 2016, at 14:33, Maurice <i...@cuhka.com> wrote:


For my OSGi based JavaFX solution on the Udoo Quad (ARM based Linux) I created 
a service that publishes the application in the context.The application does as 
little as possible. It sets up the primary stage as fullscreen and puts a 
stackpane in it. Initially the stackpane displays a 'boot logo', until the 
actual desktop bundle is started and registered with the application. Note that 
you have to start the application on a separate thread, as the thread will be 
blocked.

On Java 8 this means that although the application bundle can't be updated in a 
running OSGi container, but that is why the desktop exists. On startup it 
registers itself, and thus the application content, with the application, and 
when it is stopped it removes the content from the application. The application 
has thus rarely to be updated itself.

Regards,
Maurice.



public class UdooActivator implements BundleActivator {
private static UdooActivator activator;
private BundleContext context;

static UdooActivator bundleActivator() {
return requireNonNull(activator, "activator not set");
}

@Override
public void start(BundleContext context) throws Exception {
this.context = context;
activator = this;
new Thread(() -> Application.launch(Udoo15App.class), "JavaFX Desktop 
launcher").start();
}

@Override
public void stop(BundleContext context) throws Exception {
Platform.exit();
}

public BundleContext getBundleContext() {
return context;
}
}

Op 20-02-16 om 01:28 schreef Stephen Winnall:

Anirvan, Kevin

Thanks for this.

I’m an expert neither in JavaFX nor in OSGi, but I think the basis of the 
JavaFX/OSGi incompatibility is control. To work with OSGi, JavaFX has to 
relinquish control of its startup sequence to OSGi in such a way that 
javafx.application.Application (or its proxy) is instantiated by OSGi and 
submits to OSGi’s bundle/service lifecycle. AN OSGi expert can probably 
formulate this better…

Platform.startup(runnable) /might/ do it. Platform.launch(class) doesn’t 
because the object thereby instantiated is always under the control of JavaFX - 
and thus not of OSGi.

I’m not comfortable using JFXPanel: if I wanted to use Swing I wouldn’t be 
trying to use JavaFX. But thank you for the hint.

Steve


On 19 Feb 2016, at 16:41, Kevin Rushforth<kevin.rushfo...@oracle.com>  wrote:

And for JDK 9 there is now:

 Platform.startup(Runnable);

-- Kevin


Anirvan Sarkar wrote:

Hi Stephen,

FYI, there is another way of initializing JavaFX runtime. Just use:

new JFXPanel();

It is documented[1] that FX runtime is initialized when the first JFXPanel
instance is constructed.

Also JavaFX 9 will provide an official API to start the FX platform [2] [3].


[1]
https://docs.oracle.com/javase/8/javafx/api/javafx/application/Platform.html#runLater-java.lang.Runnable
  
<https://docs.oracle.com/javase/8/javafx/api/javafx/application/Platform.html#runLater-java.lang.Runnable>-
[2]https://bugs.openjdk.java.net/browse/JDK-8090585  
<https://bugs.openjdk.java.net/browse/JDK-8090585>
[3]
http://download.java.net/jdk9/jfxdocs/javafx/application/Platform.html#startup-java.lang.Runnable
  
<http://download.java.net/jdk9/jfxdocs/javafx/application/Platform.html#startup-java.lang.Runnable>-


On 18 February 2016 at 20:08, Stephen Winnall<st...@winnall.ch>  
<mailto:st...@winnall.ch>  wrote:

   

As I understand it, there are two ways of activating JavaFX:

1) sub-class javafx.application.Application or
2) call javafx.application.Application.launch()

 
   



Op 20-02-16 om 01:28 schreef Stephen Winnall:

Anirvan, Kevin

Thanks for this.

I’m an expert neither in JavaFX nor in OSGi, but I think the basis of the 
JavaFX/OSGi incompatibility is control. To work with OSGi, JavaFX h

Re: JFX as an OSGi service?

2016-02-20 Thread Maurice


For my OSGi based JavaFX solution on the Udoo Quad (ARM based Linux) I 
created a service that publishes the application in the context.The 
application does as little as possible. It sets up the primary stage as 
fullscreen and puts a stackpane in it. Initially the stackpane displays 
a 'boot logo', until the actual desktop bundle is started and registered 
with the application. Note that you have to start the application on a 
separate thread, as the thread will be blocked.


On Java 8 this means that although the application bundle can't be 
updated in a running OSGi container, but that is why the desktop exists. 
On startup it registers itself, and thus the application content, with 
the application, and when it is stopped it removes the content from the 
application. The application has thus rarely to be updated itself.


Regards,
Maurice.



public class UdooActivator implements BundleActivator {
private static UdooActivator activator;
private BundleContext context;

static UdooActivator bundleActivator() {
return requireNonNull(activator, "activator not set");
}

@Override
public void start(BundleContext context) throws Exception {
this.context = context;
activator = this;
new Thread(() -> Application.launch(Udoo15App.class), "JavaFX 
Desktop launcher").start();

}

@Override
public void stop(BundleContext context) throws Exception {
Platform.exit();
}

public BundleContext getBundleContext() {
return context;
}
}

Op 20-02-16 om 01:28 schreef Stephen Winnall:

Anirvan, Kevin

Thanks for this.

I’m an expert neither in JavaFX nor in OSGi, but I think the basis of the 
JavaFX/OSGi incompatibility is control. To work with OSGi, JavaFX has to 
relinquish control of its startup sequence to OSGi in such a way that 
javafx.application.Application (or its proxy) is instantiated by OSGi and 
submits to OSGi’s bundle/service lifecycle. AN OSGi expert can probably 
formulate this better…

Platform.startup(runnable) /might/ do it. Platform.launch(class) doesn’t 
because the object thereby instantiated is always under the control of JavaFX - 
and thus not of OSGi.

I’m not comfortable using JFXPanel: if I wanted to use Swing I wouldn’t be 
trying to use JavaFX. But thank you for the hint.

Steve


On 19 Feb 2016, at 16:41, Kevin Rushforth<kevin.rushfo...@oracle.com>  wrote:

And for JDK 9 there is now:

 Platform.startup(Runnable);

-- Kevin


Anirvan Sarkar wrote:

Hi Stephen,

FYI, there is another way of initializing JavaFX runtime. Just use:

new JFXPanel();

It is documented[1] that FX runtime is initialized when the first JFXPanel
instance is constructed.

Also JavaFX 9 will provide an official API to start the FX platform [2] [3].


[1]
https://docs.oracle.com/javase/8/javafx/api/javafx/application/Platform.html#runLater-java.lang.Runnable
  
<https://docs.oracle.com/javase/8/javafx/api/javafx/application/Platform.html#runLater-java.lang.Runnable>-
[2]https://bugs.openjdk.java.net/browse/JDK-8090585  
<https://bugs.openjdk.java.net/browse/JDK-8090585>
[3]
http://download.java.net/jdk9/jfxdocs/javafx/application/Platform.html#startup-java.lang.Runnable
  
<http://download.java.net/jdk9/jfxdocs/javafx/application/Platform.html#startup-java.lang.Runnable>-


On 18 February 2016 at 20:08, Stephen Winnall<st...@winnall.ch>  
<mailto:st...@winnall.ch>  wrote:

   

As I understand it, there are two ways of activating JavaFX:

1) sub-class javafx.application.Application or
2) call javafx.application.Application.launch()

 
   




Op 20-02-16 om 01:28 schreef Stephen Winnall:

Anirvan, Kevin

Thanks for this.

I’m an expert neither in JavaFX nor in OSGi, but I think the basis of the 
JavaFX/OSGi incompatibility is control. To work with OSGi, JavaFX has to 
relinquish control of its startup sequence to OSGi in such a way that 
javafx.application.Application (or its proxy) is instantiated by OSGi and 
submits to OSGi’s bundle/service lifecycle. AN OSGi expert can probably 
formulate this better…

Platform.startup(runnable) /might/ do it. Platform.launch(class) doesn’t 
because the object thereby instantiated is always under the control of JavaFX - 
and thus not of OSGi.

I’m not comfortable using JFXPanel: if I wanted to use Swing I wouldn’t be 
trying to use JavaFX. But thank you for the hint.

Steve


On 19 Feb 2016, at 16:41, Kevin Rushforth <kevin.rushfo...@oracle.com> wrote:

And for JDK 9 there is now:

 Platform.startup(Runnable);

-- Kevin


Anirvan Sarkar wrote:

Hi Stephen,

FYI, there is another way of initializing JavaFX runtime. Just use:

new JFXPanel();

It is documented[1] that FX runtime is initialized when the first JFXPanel
instance is constructed.

Also JavaFX 9 will provide an official API to start the FX platform [2] [3].


[1]
https://docs.oracle.com/javase/8/javafx/api/javafx/application/Platform.html#runLater-

Re: NPE in PrismFontLoader.java: Loading primary font factory failed

2016-02-19 Thread Maurice

Kevin,

Yes, in lib/arm these libraries are present. I'm using the Oracle ARM 
JDK 1.8.0_33 fwiw. On the default ubuntu based image I can run JavaFX 
with this Java setup, but without HW acceleration.


Maurice.

root@udooqdl:/# find / -name "*javafx_font*.so"
/opt/jdk1.8.0_33/lib/arm/libjavafx_font_freetype.so
/opt/jdk1.8.0_33/lib/arm/libjavafx_font_pango.so
/opt/jdk1.8.0_33/lib/arm/libjavafx_font.so
/opt/jdk1.8.0_33/jre/lib/arm/libjavafx_font_freetype.so
/opt/jdk1.8.0_33/jre/lib/arm/libjavafx_font_pango.so
/opt/jdk1.8.0_33/jre/lib/arm/libjavafx_font.so


Op 19-02-16 om 16:49 schreef Kevin Rushforth:
Do you have the pango and freetype libraries installed on your 
platform? One thing to check is whether any dependent libraries are 
missing for the following .so files:


   ldd  libjavafx_font.so
   ldd  libjavafx_font_freetype.so
   ldd  libjavafx_font_pango.so

-- Kevin


Maurice wrote:
I'm building a Yocto Embedded Linux image for the ARM based Udoo 
Board Quad. At the moment the build is good enough that JavaFX seems 
to see the Vivante GPU, but my small test program fails with a 
NullPointerException:
at 
com.sun.javafx.font.PrismFontLoader.font(PrismFontLoader.java:172)

at javafx.scene.text.Font.font(Font.java:148)
at javafx.scene.text.Font.font(Font.java:228)
at com.cuhka.Sample.start(Sample.java:18)

I tried several steps from the OpenJFX Font Setup 
<https://wiki.openjdk.java.net/display/OpenJFX/Font+Setup> page, I 
checked the presence of the ${java.home}/lib/fonts folder and it does 
exist. Running the program with -Dprism.debugfonts=true shows some 
error:


Loading FontFactory com.sun.javafx.font.freetype.FTFactory
Subpixel: enabled
Loading font factory failed com.sun.javafx.font.freetype.FTFactory
Loading font factory failed com.sun.javafx.font.t2k.T2KFactory
*** Loading primary font factory failed. ***
*** Fallbacking to com.sun.javafx.font.t2k.T2KFactory ***

What should be added to the platform for this to be fixed?

Maurice.





NPE in PrismFontLoader.java: Loading primary font factory failed

2016-02-19 Thread Maurice
I'm building a Yocto Embedded Linux image for the ARM based Udoo Board 
Quad. At the moment the build is good enough that JavaFX seems to see 
the Vivante GPU, but my small test program fails with a 
NullPointerException:

at com.sun.javafx.font.PrismFontLoader.font(PrismFontLoader.java:172)
at javafx.scene.text.Font.font(Font.java:148)
at javafx.scene.text.Font.font(Font.java:228)
at com.cuhka.Sample.start(Sample.java:18)

I tried several steps from the OpenJFX Font Setup 
<https://wiki.openjdk.java.net/display/OpenJFX/Font+Setup> page, I 
checked the presence of the ${java.home}/lib/fonts folder and it does 
exist. Running the program with -Dprism.debugfonts=true shows some error:


Loading FontFactory com.sun.javafx.font.freetype.FTFactory
Subpixel: enabled
Loading font factory failed com.sun.javafx.font.freetype.FTFactory
Loading font factory failed com.sun.javafx.font.t2k.T2KFactory
*** Loading primary font factory failed. ***
*** Fallbacking to com.sun.javafx.font.t2k.T2KFactory ***

What should be added to the platform for this to be fixed?

Maurice.



Re: [PATCH] buildscript java version detection fails on Linux/Ubuntu on Picked up JAVA_TOOL_OPTIONS

2015-08-29 Thread Maurice le Rutte
Since I haven't received any additional feedback, should I push this patch?

Op 27 aug. 2015 15:56 schreef i...@cuhka.com:

 I've adapted the build.gradle to use java -fullversion instead of java  
 -version, parsing the result with a regexp. 

 diff -r 9b5fc7c1e5e6 build.gradle 
 --- a/build.gradle Fri Aug 07 18:35:42 2015 -0700 
 +++ b/build.gradle Thu Aug 27 15:52:11 2015 +0200 
 @@ -719,29 +719,27 @@ 
   if (!file(JAVAH).exists()) throw new Exception(Missing or incorrect  
 path to 'javah': '$JAVAH'. Perhaps bad JDK_HOME? $JDK_HOME) 
   if (!file(JAVADOC).exists()) throw new Exception(Missing or  
 incorrect path to 'javadoc': '$JAVADOC'. Perhaps bad JDK_HOME?  
 $JDK_HOME) 

 - 
 + 
   // Determine the verion of Java in JDK_HOME. It looks like this: 
   // 
 -// $ java -version 
 -// java version 1.7.0_45 
 -// Java(TM) SE Runtime Environment (build 1.7.0_45-b18) 
 -// Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) 
 -// 
 -// We need to parse the second line 
 -def inStream = new java.io.BufferedReader(new  
 java.io.InputStreamReader(new java.lang.ProcessBuilder(JAVA,  
 -version).start().getErrorStream())); 
 +// $ java -fullversion 
 +// for OpenJDK: openjdk full version 1.8.0_45-internal-b14 
 +// for Oracle JDK: java full version 1.8.0_45-b14 
 + 
 +def inStream = new java.io.BufferedReader(new  
 java.io.InputStreamReader(new java.lang.ProcessBuilder(JAVA,  
 -fullversion).start().getErrorStream())); 
   try { 
 -    if (inStream.readLine() != null) { 
 -    String v = inStream.readLine(); 
 -    if (v != null) { 
 -    int ib = v.indexOf( (build ); 
 -    if (ib != -1) { 
 -    String ver = v.substring(ib + 8, v.size() - 1); 
 - 
 -    defineProperty(jdkRuntimeVersion, ver) 
 -    defineProperty(jdkVersion, 
 jdkRuntimeVersion.split(-)[0]) 
 -    defineProperty(jdkBuildNumber,  
 jdkRuntimeVersion.substring(jdkRuntimeVersion.lastIndexOf(-b) + 2)) 
 -    } 
 -    } 
 +    def v = inStream.readLine(); 
 + 
 +    if (v != null) { 
 + def pattern =  
 java.util.regex.Pattern.compile(^[^\]*\((\\d+(?:\\.\\d+)*)_(\\d+))(?:-\\w+)?(?:-b(\\d+))\\$)
  
 + def matcher = pattern.matcher(v) 
 + 
 + if (matcher.matches()) { 
 +    defineProperty(jdkVersion, matcher.group(1)) 
 +    defineProperty(jdkRuntimeVersion, matcher.group(2)) 
 +    defineProperty(jdkUpdate, matcher.group(3)) 
 +    defineProperty(jdkBuildNumber, matcher.group(4)) 
 + } 
   } 
   } finally { 
   inStream.close();