Drivers currently included

Shiny has three complete drivers at the time of writing (win, gl, and x11) and each of these drivers must implement all of the input and output capabilities of the Shiny toolkit. The output portion of a driver is required to define a suitable screen.Texture provider so that buffers can be uploaded ready for rendering and to handle the rendering process. On the input side, a driver must handle mouse and keyboard events and translate them into golang.org/x/mobile types that can then be filtered by the Shiny event-handling code. The details of each driver are as follows:

  • gl: The most commonly used driver, built on top of the cross-platform OpenGL, it makes use of this standard API for graphical display. Many operating systems provide this functionality, though it should be noted that this may not be supported on all devices.
  • win: The win driver is built specifically for the Microsoft Windows operating system to work without the OpenGL APIs. Rendering is provided by the Graphics Device Interface (GDI).
  • x11: The X11 driver provides support for the standard graphical desktop platform on Linux and Unix. It communicates directly with the XServer and uses the SHared Memory (SHM) extension for communicating image data efficiently.

Between these drivers, there is at least one render definition for all of the operating systems supported by the toolkits described earlier in this book, and potentially more. These details shouldn't be a concern day to day when programming with Shiny but it helps to understand possible extensions in the future.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.54.136