As the Quantum author I will echo Johan that looking at the QuantumToolkit.pulse() and QuantumRenderer.submitRenderJob() are good places to start. Ignore the PaintCollector (Pain Collector :-) ) and pay attention to the View Painters.

This article has good background.

http://fxexperience.com/2012/02/a-short-tour-through-javafx-ui-common/

The SceneGraph converts SG nodes to Prism NG nodes. The painters convert Prism NG nodes into graphics operations. That node graph is rendered onto a Prism hardware (or software prism-sw) pipeline. This winds up at the GPU layer in places like native-prism-es2/macosx or native-prism-d3d.

Glass manages operating system resources like menu bars, events, dragging, pasteboard, screens and graphical layers.

On Mac OSX drawing winds up in native-glass/mac in places like GlassView3D.m (begin, end) and GlassLayer3D.m (drawInCGLContext) - a good way to see what is going on at the low level is uncommenting VERBOSE in these Glass classes in native-glass/mac and seeing the flow at the native level.

There is sort of a separation of Church and State thing going on with the Prism native layers (native-prism-es2/macosx vs native-glass/mac) that has been very well designed over various iterations by Chein Yang in the Java Client Group.

One final note about time from the Quantum dude. Our JavaFX timebase is not driven by a time that is going off at 16 ms to simulate a 60 Hertz retrace. Our pulsed painting timebase (since RT-13660) is driven from the vertical retrace interval. Quantum queues up the pulses from the Glass timer at 16 ms (faster than 60 Hz), such that a pulse is waiting its turn for the graphics vertical retrace to happen (on Mac, Linux-GPU, Windows-D3D and iOS). The pulse is kicked off immediately after the vertical retrace which ensures a rock solid 60 Hz timebase for JavaFX animations.

        --morris

NP - Young the Giant, Young the Giant, My Body


On 3/7/16 10:45 PM, Jeffrey Guenther wrote:
Hi Devs,

I’m interested in learning more about JavaFX’s low level graphics implementation. 
I’ve spent a couple afternoons source diving in the modules/graphics folder to get 
the lay of the land and now I think I need some help. Can anyone point me to 
documentation describing the system’s high level design? Let’s say one or two levels 
deeper than http://docs.oracle.com/javafx/2/architecture/jfxpub-architecture.htm? 
<http://docs.oracle.com/javafx/2/architecture/jfxpub-architecture.htm?>

Ultimately, I’d like to gain a better understanding on how JavaFX lays out and 
renders text for the purposes of understanding how I might be able to 
contribute to a more advanced text API with support for things like kerning.

Secondly, can anyone explain to me how shaders are compiled and passed down to 
the graphics layer? I’d like to gain a better understanding of how a JavaFX 
programmer could leverage/add to Prism such that we can write custom 
shaders/GPU kernels for Effects nodes.

I realize the graphics system in JavaFX is not for the faint of heart. There’s 
much going on beneath the surface. I’m willing to dive deep and do the learning 
to understand the design. Can anyone point me to docs where I can get started? 
Or maybe which class to start with and work out from when I’m source diving?

Jeff

Reply via email to