If you want to use more than one GPU for rendering the UI, you should create different Coherent::UI::ViewContext
for each different GPU you wish to use. For example, let us have 3 GPUs on the system. Their ordinal numbers would be 0, 1 and 2; with 0 being the primary display adapter. In this case, if you want to do the UI rendering using GPUs with ordinal numbers 1 and 2, you should pass to the DisplayAdapterID memeber of Coherent::UI::ContextSettings
, the ordinal number of the GPU. Here's the sample code:
By default, view contexts use the primary display adapter (which has an ordinal number 0). So if you want to use the primary display adapter for a particular Coherent::UI::ViewContext
you can by-pass filling-in the DisplayAdapterID
member.
DisplayAdapterID
an ordinal number exceeding the number of GPUs in the system you will get an error in the log about this, and no rendering will take place for this context.