Maisner
Posts: 1
Joined: Tue Sep 22, 2015 6:12 am

JavaFX on Raspberry Pi 2 B with 4Dpi-24-HAT

Tue Sep 22, 2015 6:26 am

Hello,

I have a Raspberry Pi 2 B with display 4DSystem 4DPi-24-HAT. Display works fine but When I running the JavaFX app on terminal this command

Code: Select all

java -jar Hello.jar
app is showed in HDMI, not in 4DPi-24-HAT.

What I can do to show the application in 4DPi-24-HAT?

Thanks

User avatar
xranby
Posts: 540
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: JavaFX on Raspberry Pi 2 B with 4Dpi-24-HAT

Wed Sep 23, 2015 10:29 am

Maisner wrote:I have a Raspberry Pi 2 B with display 4DSystem 4DPi-24-HAT. Display works fine but When I running the JavaFX app on terminal this command

Code: Select all

java -jar Hello.jar
app is showed in HDMI, not in 4DPi-24-HAT.

What I can do to show the application in 4DPi-24-HAT?
By default it is "impossible" to make the Broadcom OpenGL ES driver render directly to the 4DPi-24-HAT due to technical reasons:
1. the Broadcom OpenGL ES driver can only render to a DispmanX surface and these DispmanX surfaces only appear on the HDMI, DSI (such as the new Pi 7" display) or when using a DPI GPIO TFT screen (such as the adafruit kippah), it is the Broadcom firmware that do the rendering thus it is done outside the linux kernel. The 4DPi-24-HAT creates a new Linux kernel framebuffer that the Broadcom firmware do not know about.
2. the 4dsystems.com.au have not published the sourcecode to the 4DPi-24-HAT kernel driver on their website :!: thus it is impossible to work on a fix for the 4DPi-24-HAT kernel module

The only easy workaround i can think of is to run a DispmanX VNC viewer on the Pi and then run a VNC viewer on the 4DPi-24-HAT that connects locally. the DispmanX VNC server can capture the output rendered to the hdmi on the Broadcom OpenGL ES drivers DispmanX surface and make it appear on the xorg session running on the 4DPi-24-HAT provided framebuffer.
https://github.com/hanzelpeter/dispmanx_vnc
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

Return to “Java”