################
Software Startup
################

.. toctree::
    :maxdepth: 1
    :titlesonly:
    :hidden:

    bk_ba_ss/bk_ba_hardware_hybrid_or_software_start
    bk_ba_ss/bk_ba_hardware_event_loop_vs_software_event_loop


As you may know, HOOPS Luminate is a hybrid rendering engine: it can run and display data using the system's graphic adapter (GPU) or it can run without using it and display data using a pure software (CPU) rendering mode. To quickly dive into the topic, HOOPS Luminate can be started in one or the other mode using the code sample below:

.. include:: /tasks/ta_ca/ta_ca_application/tk_hardware_or_software_startup.rst

Then, if a problem arise during the first startup procedure (for instance, if the graphics hardware is not supported), then the following procedure can be set to restart HOOPS Luminate in software mode instead of the hardware mode:

.. include:: /tasks/ta_ca/ta_ca_application/tk_software_restart_after_failure.rst

There are differences to understand between the rendering technologies that co-exist in HOOPS Luminate:

+----------------------------------+----------------------------------+
| **Hardware Rendering**           | **Software Rendering**           |
+==================================+==================================+
| Setup                            | Setup                            |
| RED                              | RED                              |
| ::OPTIONS_RAY_ENABLE_SOFT_TRACER | ::OPTIONS_RAY_ENABLE_SOFT_TRACER |
| equal to 0 (hardware) or 1       | equal to 2 (software) on the     |
| (hybrid) on the cluster's        | cluster's resource manager.      |
| resource manager.                |                                  |
+----------------------------------+----------------------------------+
| Rendering uses a scanline        | Rendering uses native            |
| algorithm, implemented by the    | ray-tracing, implemented by      |
| OpenGL operating system layer.   | Tech Soft 3D.                    |
+----------------------------------+----------------------------------+
| Rendering uses one CPU core and  | Rendering uses CPU cores for the |
| requires a GPU for the display.  | calculation and the OS rendering |
|                                  | API for the display.             |
+----------------------------------+----------------------------------+
| The rendering call is            | The rendering call is            |
| RED::IWindow::FrameDrawing.      | RED::IWindow::FrameTracing       |
|                                  | (and/or derived calls).          |
+----------------------------------+----------------------------------+
| One rendering call displays an   | After a rendering call, the      |
| entire frame.                    | frame may be incomplete. The     |
|                                  | application may need to loop to  |
|                                  | get a complete result, due to    |
|                                  | the display using progressive    |
|                                  | refinement.                      |
+----------------------------------+----------------------------------+
| Real-time (limited) rendering    | Photo-realistic rendering        |
| quality.                         | quality.                         |
+----------------------------------+----------------------------------+

As illustrated above, from an application design standpoint, using hardware rendering or software rendering makes a difference in the way to manage events. Using the hardware, once the rendering call has returned, the image is complete and it's displayed by the hardware. In software, the image has just started to be calculated. It may be more or less complete, depending of course on rendering options and on the data to be visualized, but most of the times, several rendering calls will be needed to get the image complete. Consequently, the calling application must be manage that fact if it has to use software rendering.

A comparison of typical application rendering loops can be found here: :doc:`/book/subjects/bk_ba/bk_ba_ss/bk_ba_hardware_event_loop_vs_software_event_loop`.

Then, please refer to this page: :doc:`/book/subjects/bk_ba/bk_ba_ss/bk_ba_hardware_hybrid_or_software_start` for details on all the startup modes of HOOPS Luminate.



