hnkb / crib

MIT License
0 stars 0 forks source link

Evaluate available 2D overlay options #19

Open hnkb opened 4 years ago

hnkb commented 4 years ago

Options include:

HTML UI is excellent, but might be too slow (chromium DLL itself is many tens of megabytes large). Ultralight claims to be fast (must be tested), and is designed explicitly for our scenario, but its license is restrictive. So we may want to also check out a more generic CEF-based solution.

In case of slow performance from HTML renderer, we can also add a simple 2D language ourself, to be fast and reduce dependencies. This should not be very complex, because for more complex scenarios we always have a full-fledged HTML browser.

hnkb commented 4 years ago

If custom 2D objects is chosen, I will need to then create an issue with these steps:

hnkb commented 3 years ago

Basic feedback I get from Ultralight and Sciter is that they are certainly fast enough and can be integrated into 3D pipeline. Sciter has a very liberal license and performs really well. It is also very easy to integrate into C++ and communicate with DOM from C++, but has some usability issues which limit its usefulness. Its DOM and CSS have some browser-incompatibilities and it has its own scripting language instead of Javascript. This means that there is little possibility of supporting both web and app from the same code base.

To achieve the best possible web/app harmony, I think it is best to provide an internal HTTP server in the C++ side to communicated with an otherwise web-like HTML DOM/CSS and this is probably easier achieved with Ultralight.

Don't forget that a third option also exists (how acceptable is it?) to have a complete web site with WebGL inside an electron instance.