-
|
Because there is an infinite loop in the entry function bool running = true;
while (running)
{
running = Backend::ProcessEvents(context, &Shell::ProcessKeyDownShortcuts);
context->Update();
Backend::BeginFrame();
context->Render();
Backend::PresentFrame();
}So should I create multiple threads to support multiple windows? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The backends should be considered basic examples for the most common use cases. If you need extra features, like multi-window in your case, then I recommend that you step in and modify the backend (and the loop) to your own needs. It would probably be a lot easier if you stick to a single thread, so I recommend starting there unless you have some experience with multi-threaded environments. Remember that any access into RmlUi needs to be synchronized when using multiple threads. |
Beta Was this translation helpful? Give feedback.
The backends should be considered basic examples for the most common use cases. If you need extra features, like multi-window in your case, then I recommend that you step in and modify the backend (and the loop) to your own needs.
It would probably be a lot easier if you stick to a single thread, so I recommend starting there unless you have some experience with multi-threaded environments. Remember that any access into RmlUi needs to be synchronized when using multiple threads.