Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Table of Contents

Overview

Monocle is an experimental the implementation of the Glass windowing component of JavaFX . It's targeted at for embedded systems. Monocle provides windowing functionality and access to native graphics for simple embedded systems that do not have an underlying window system. It is an ongoing effort.

Description of Monocle components

...

If you build OpenJFX for embedded Linux/ARM platforms from the 8u-dev repository then you get a functioning Monocle as well. You can also build it for Linux/x86 using the x86egl compile target (build with -PCOMPILE_TARGETS=x86egl on a system with GLESv2 and EGL development libraries installed). This builds the embedded stack for the Linux desktop; it is not the same as the GTK implementation of Glass. You cannot currently build any of the graphical implementations of Monocle for desktop windowing systems.

How to run Monocle

Since Monocle is an experimental now the default implementation of Glass , it is not the default on any platform. To select it you run Java with the system property -Djavafx.platform=monocle on embedded platforms. This selects the Monocle implementation of Glass and sets other JavaFX options to match the embedded stack. 

You can also select one of the specific back-ends of Monocle with the system property monocle.platform. Not all Monocle Some of the back-ends work with all Prism back-ends, so you might need to set prism.order as well.For accelerated rendering with Monocle it is currently necessary to set -Dembedded=monocleonly with hardware rendering (the es2 pipeline); some work only with software rendering (the sw pipeline).

monocle.platformprism.order optionsHardware on which this might work
MX6es2 (default) or swFreescale i.MX6 SDP or similar boards. Needs accelerated Vivante graphics drivers for framebuffer; not all OS configurations have these.
OMAPes2 (default) or sw

BeagleBoard xM. Note that the es2 pipeline requires PowerVR graphics drivers, which are only available on soft float configurations of Linux on the BeagleBoard.

OMAPX11es2BeagleBoard
(might require additional Prism changes)
xM. Renders the JavaFX window stack to a single X11 window.
X11es2BeagleBoard
(might require additional Prism changes)
; Linux/x86 desktop
LinuxswAny Linux system
with the sw renderer.
; uses software rendering
HeadlessswAny system
VNCswAny system

If you are running the desktop build of JavaFX or OpenJFX then your only monocle option is Headless. Desktop JavaFX does not support the javafx.platform system property, but you can select Monocle with:
-Dglass.platform=Monocle -Dmonocle.platform=Headless -Dprism.order=sw

On MacOS and Windows, removing -Dprism.order=sw can be critical to prevent crashes.

Status

What's working:

  • Accelerated rendering on Freescale i.MX6, BeagleBoard xM and Raspberry Pi
  • Mouse, key and single-point/multi-point touch input with Linux device nodes
  • Synthesis of mouse events from touch events
  • Double-buffered software rendering to memory-mapped /dev/fb0, with a software cursor
  • Hardware cursors Cursors on OMAP3 and , i.MX6 and Raspberry Pi
  • Touch coordinate transformations for screen calibration 
  • Pluggable pipeline for touch event cleanup
  • Nested event loops
  • Robot input and capture
  • Most of HelloSanity is working on Freescale i.MX6 and BeagleBoard , BeagleBoard xM and Raspberry Pi
  • Headless implementation running on embedded and desktop platforms, passing unit and system tests (base/graphics tests, system tests and Linux input tests)
  • VNC server mode with remote display and mouse input
  • Mouse input and accelerated rendering on X11

...

  • Drag and Drop
  • Full screen and minimized windows

What's not done yet:

...

  • Android port
  • DirectFB port

See also the JIRA query for open issues on Monocle

 

How to port Monocle

See Porting JavaFX to additional embedded Linux devices