Coherent UI  2.5.3
A modern user interface library for games
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Architecture Overview

Multiprocess

In order to exploit the full capabilities of the underlying platform, Coherent UI has a multiprocess architecture. It has the following processes:

  • Host process - this is the process that communicates with your game and all the other processes of Coherent UI.
  • Render process - this is the process that performs the layout of the view. All JavaScript runs in this process. There is one Render process per view.
  • GPU process - this is the process that draws the view on the GPU. There may be only one GPU process

Asynchronous

Almost everything in Coherent UI is asynchronous. Most calls to Coherent UI require same callback or listener, that will be notified the result is ready or some event has occurred.

Note
All callbacks are executed and all listeners are notified inside the Coherent::UI::ViewContext::Update method.

Thread Safety

Coherent UI is not thread safe, except for parts that are explicitly marked as such. All view manipulations and events triggering must always happen in the same thread that calls Coherent::UI::ViewContext::Update. In order to support client application that have a multi-threaded rendering architecture however Coherent UI supports fetching surfaces from a thread different than the one that calls Coherent::UI::ViewContext::Update. This results in Coherent::UI::ViewListener::OnDraw callback being executed on the other thread. Rendering resource creation and destruction can also happen in secondary threads through the response object mechanism.